Skip to content

Releases: swiftwasm/carton

0.5.0

20 Aug 11:09
7150f62
Compare
Choose a tag to compare

This release updates both basic and tokamak templates in carton init for compatibility with the latest JavaScriptKit and Tokamak versions. Additionally, carton dev now cleans build logs from previous builds when its watcher is triggered. New --verbose flag was added, which restores the previous behavior with all build logs listed on the same screen.

carton dev and carton test now install 5.3 SwiftWasm snapshots by default, which in general are more stable than the previously used SwiftWasm development snapshots, and are compatible with Xcode 12 betas. You can now also add direct dependencies on a specific JavaScriptKit version instead of a revision with these 5.3 snapshots, as they contain a workaround for the unsafe flags issue reproducible with SwiftWasm development snapshots.

Allowing carton to select a default snapshot is now the recommended approach, so in general we suggest avoiding .swif-version files in projects that use carton.

The issue where carton dev hangs on exit after establishing at least one WebSocket connection with a browser is now fixed in our Vapor dependency. Kudos to @tanner0101 for diagnosing and fixing the issue!

Thanks to @carson-katri, @RayZhao1998 for their contributions to this release!

Closed issues:

  • Compiling swift packages that depend on Darwin or Glibc (#89)
  • Detect the currently selected version of Xcode and warn if it's 12 beta (#81)
  • Print the error output of swift package dump-package (#78)
  • JavaScriptKit dependency missing in the basic template (#77)
  • carton sdk install crashes when passed an invalid version (#72)
  • No package found when invoking carton dev (#71)
  • Xcode 12 beta 3 compatibility (#65)
  • Delay on Ctrl-C with error: Could not stop HTTP server (#7)

Merged pull requests:

0.4.1

22 Jul 20:16
e0b82ba
Compare
Choose a tag to compare

This release modifies the tokamak template for carton init to use the main branch of Tokamak. This fixes dependency resolution issues caused by unsafe build flags in JavaScriptKit. Please see swiftwasm/JavaScriptKit#6 for more details.

0.4.0

21 Jul 21:25
0e8f003
Compare
Choose a tag to compare

This release adds a few major features, namely carton init and carton test commands, carton sdk local subcommand, and enables support for linking with Foundation automatically.

Thanks to @carson-katri, @RayZhao1998, @JaapWijnen and @broadwaylamb for their contributions to this release!

New features:

Firstly, carton dev no longer requires a --destination flag with a manually crafted destination.json file to link with Foundation. If your project has import Foundation anywhere in its source code, a subset of Foundation provided with SwiftWasm is automatically linked. Please check the list of Foundation types currently unavailable in SwiftWasm for more details on Foundation compatibility (mostly filesystem, socket, multi-threading, and APIs depending on those are disabled).

The new carton init command initializes a new SwiftWasm project for you (similarly to swift package init) with multiple templates available at your choice. carton init --template tokamak creates a new Tokamak project, while carton init --template basic (equivalent to carton init) creates an empty SwiftWasm project with no dependencies. Also, carton init list-templates provides a complete list of templates (with only basic and tokamak available currently).

The new carton test command runs your test suite in the wasmer environment. Unfortunately, this currently requires a presence of LinuxMain.swift file and explicit test manifests, --enable-test-discovery flag is not supported yet. Projects that can build their test suite on macOS can use swift test --generate-linuxmain command to generate this file.

Breaking changes:

The bundled carton dev JavaScript entrypoint has been updated to fix runtime issues in the Swift-to-JavaScript bridge API. Because of this, projects that depend on JavaScriptKit should specify c90e82f revision as a dependency:

  dependencies: [
    .package(url: "https://github.com/kateinoigakukun/JavaScriptKit", .revision("c90e82f")),
  ],

Unfortunately, specifying a JavaScriptKit version in Package.swift as a dependency is not supported by SwiftPM due to the use of unsafe flags, see swiftwasm/JavaScriptKit#6 for more details.

Closed issues:

  • Avoid running the tests if can't build them (#56)
  • Verify SDK is already installed before installing the same version (#45)
  • Automatically create destination JSON to allow linking Foundation (#4)
  • Watcher should detect custom paths in Package.swift (#1)

Merged pull requests:

0.3.1

07 Jul 22:03
17888f1
Compare
Choose a tag to compare

This is a bugfix release that fixes SwiftWasm backtrace reporting in certain cases and also enables sorting for the output of the carton sdk versions subcommand.

Merged pull requests:

0.3.0

07 Jul 15:02
4c26398
Compare
Choose a tag to compare

This is a release that adds a new carton sdk versions subcommand, new --release flag and a new --destination option to the carton dev command. Additionally, archive size is logged when a new SDK is downloaded, and backtrace logging is improved in browser consoles for crashing SwiftWasm apps. Many thanks to @RayZhao1998 and @ratranqu for their contributions! 👏

Closed issues:

  • Support linking with Foundation/CoreFoundation (#11)

Merged pull requests:

0.2.0

26 Jun 14:46
c92dab8
Compare
Choose a tag to compare

This release introduces a new carton sdk install command that allows you to quickly install the SwftWasm toolchain and SDK without requiring any additional dependencies such as swiftenv. Also, carton dev now automatically installs SwiftWasm through the same code paths as carton sdk install, when no suitable SDK is detected.

0.1.5

22 Jun 12:39
b4f1711
Compare
Choose a tag to compare
0.1.5 Pre-release
Pre-release

This is a refinement release that adds a --version flag. Additionally, the dev command is no longer the default, now a simple carton invocation without any arguments prints a help message describing available commands.

0.1.4

21 Jun 21:26
bd9cb4c
Compare
Choose a tag to compare
0.1.4 Pre-release
Pre-release

This is a bugfix release that fixes the dev.js bundle broken in 0.1.3.

0.1.3

21 Jun 20:28
c0000cf
Compare
Choose a tag to compare
0.1.3 Pre-release
Pre-release

This is a bugfix release that includes the latest version of JavaScriptKit runtime in the dev.js bundle. It fixes a bug with reference counting of JSObjectRef instances, which could lead to crashes.

0.1.2

19 Jun 15:27
8cfe4d4
Compare
Choose a tag to compare
0.1.2 Pre-release
Pre-release

This is a bugfix release that fixes stdout and stderr WASI output in async handlers. Previously stdout output was redirected with console.log only on the first pass of execution of top-level code, while none of the output from async handlers (such as DOM listeners) was redirected. Now in this release, stdout and stderr output is consistently redirected with console.log and console.error respectively, in all cases.