Skip to content

Releases: swiftwasm/carton

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.

0.1.1

18 Jun 23:36
d5e1bf9
Compare
Choose a tag to compare
0.1.1 Pre-release
Pre-release

This is a bugfix release that fixes dependency downloads on Linux. The issue was caused by Foundation not supporting HTTP redirects in Swift 5.2 on Linux, and is now resolved by using AsyncHTTPClient instead of Foundation's URLSession for dependency downloads.