Skip to content

Releases: swiftwasm/carton

0.10.0

30 May 11:22
Compare
Choose a tag to compare

This is a bugfix release that resolves issues with incorrect or missing diagnostic output, improves our end-to-end test coverage, and updates dependencies and carton init templates.

Additionally, we improved support for demangling stack traces in different browsers, and added a stack overflow sanitizer that's enabled by default for debug builds.

Many thanks (in alphabetical order) to @j-f1, @kateinoigakukun, @literalpie, @thecb4, and @yonihemi for their contributions to this release!

Closed issues:

  • carton test command unable to find gtk+3 using --template tokamak (#241)
  • carton also requires zlib.h to compile from source (#237)
  • carton test --environment defaultBrowser broken on GitHub Actions (#200)
  • Add --host option to carton dev and carton test (#193)
  • Replace hard-coded path delimiters (#183)
  • Use libSwiftPM instead of custom model types (#120)

Merged pull requests:

0.9.1

19 Dec 15:34
b47058f
Compare
Choose a tag to compare

This is a bugfix release that fixes parsing of Package.swift manifests that contain dependencies on system targets. It also adds support for Chrome and Safari stack traces. Many thanks to @j-f1 for the contribution!

Merged pull requests:

0.9.0

04 Dec 13:08
a7314cb
Compare
Choose a tag to compare

This release adds multiple changes and new features:

  • New --environment option on carton test, which when passed --environment defaultBrowser runs test suites of a given package in your default browser, allowing you to use JavaScriptKit and other browser-specific dependencies in your tests. Another available option is --environment wasmer, which is the old and still the default behavior, which runs the test suite in wasmer.

  • Now when your SwiftWasm app crashes in Firefox, the strack trace will printed by carton dev and carton test in terminal with function symbols demangled, which makes crashes much easier to debug. Since different browsers format their stack traces differently, support for browsers other than Firefox will be added separately in a future version of carton.

  • carton dev and carton bundle now serve SwiftPM resources declared on targets of executable products from the root / path, in addition to a subpath automatically generated for Bundle.module. This was a necessary change to allow the Image view to work properly in Tokamak.

  • Support for JavaScriptKit 0.9.0, which allows catching JavaScript exceptions in Swift code.

  • The default SwiftWasm toolchain is now 5.3.1, which is a recommended bugfix update for all of our users.

Merged pull requests:

0.8.2

09 Nov 14:37
90d072a
Compare
Choose a tag to compare

This patch release updates the default version of Tokamak in the carton init template to fix autocomplete in Xcode.

Merged pull requests:

0.8.1

09 Nov 11:25
5c6a3d0
Compare
Choose a tag to compare

This patch release updates the default version of Tokamak in templates used by carton init.

Merged pull requests:

0.8.0

08 Nov 00:31
59bc827
Compare
Choose a tag to compare

This is a bugfix and feature release that coincides with the stable 5.3.0 release of SwiftWasm, uses it as the default toolchain, and enables compatibility with it. This is the recommended version of SwiftWasm, and older development snapshots are no longer supported in carton. We also discourage you from adding .swift-version files to your project or using new development snapshots, unless you'd like to try a preview of a new Swift feature. If there's anything that prevents you from using the 5.3.0 release of SwiftWasm instead of a specific 5.3 development snapshot, please report it as a bug.

Many thanks to @carson-katri, @kateinoigakukun for their contributions to this release!

Notable changes:

  • carton test now parses output of XCTest and reformats as a clear test summary with colors highlighted in terminals that support it.
  • Our WasmTransformer dependency now can strip debug information from release bundles, which means carton bundle no longer requires WABT with its wasm-strip utility to run.
  • carton test previously built all targets in a SwiftPM package even when they weren't direct or indirect dependencies of test targets, which mirrored the behavior of swift test. This could cause issues with packages that have some targets that are incompatible with the WASI platform, but are excluded from dependency trees otherwise. This is no longer the case, carton test now only builds targets that are actually needed to run the tests in a given package.
  • SwiftPM included in the SwiftWasm 5.3.0 toolchain produces executable binaries with the .wasm extension. This version of carton now assumes this extension is present in filenames of WebAssembly binaries, which makes old development snapshots incompatible.
  • carton now looks for SwiftWasm SDKs installed in the /Library/Developer/Toolchains directory in addition to the ~/.carton/sdk and ~/Library/Developer/Toolchains directories on macOS.

Closed issues:

  • Search /Library/Developer/Toolchains also (#146)

Merged pull requests:

0.7.1

22 Oct 17:00
1c946ea
Compare
Choose a tag to compare

This is a bugfix release that prevents carton commands from re-downloading .pkg toolchains
on macOS on every CLI invocation.

0.7.0

22 Oct 16:12
9d8a8a5
Compare
Choose a tag to compare

This release contains bugfixes and improvements.

Now SwiftWasm binaries built with carton are fully compatible with Safari, even when they use functions that return 64-bit integers. This was caused by the lack of support for conversions between i64 and BigInt types in Safari. Starting with this release when you use carton dev or carton bundle binaries are converted during the build process with WasmTransformer to become compatible with Safari.

Additionally, when you run carton dev a new tab with your app is opened in your default browser automatically. You can now also specify a port to use for the development server with the --port option (-p for short).

All carton commands that build Swift code now pretty-print error messages in case of failures. If an error message points to a specific location in your code, surrounding code has its syntax highlighted in terminals.

carton test now automatically passes --enable-test-discovery flag when building your tests, so you no longer need to manually maintain LinuxMain.swift and XCTestManifests.swift files in your test suites.

carton now uses the wasm-5.3-SNAPSHOT-2020-10-21-a toolchain and SDK by default. This and most of our recent snapshots are built for both Ubuntu 18.04 and 20.04, the latter supported in carton for the first time. carton automatically detects the version of your OS and downloads an appropriate snapshot. Recent snapshots for macOS are also tested on macOS Big Sur on Intel CPUs (Apple Silicon is not supported yet), and are signed and distributed as .pkg files, which carton fully supports now.

Lastly, we've prepared a prebuilt Docker image for you that you can get by running

docker pull ghcr.io/swiftwasm/carton:latest

This image has the toolchain and all required dependencies preinstalled.

Many thanks to @carson-katri, @kateinoigakukun, and @yonihemi for their contributions to this release!

Closed issues:

  • Method with i64 return type fails on Safari 13+14 (#127)
  • Provide a Dockerfile for easier distribution and testing on Linux (#119)
  • Support downloading Ubuntu 20.04 SDK (#114)
  • carton dev should open a browser window when server starts (#92)

Merged pull requests:

0.6.1

29 Sep 10:45
6c1a12d
Compare
Choose a tag to compare

This release fixes basic carton init template that was pulling an incompatible version of JavaScriptKit in carton 0.6.0.

0.6.0

28 Sep 20:37
e76a97e
Compare
Choose a tag to compare

This release introduces a new carton bundle command that produces an optimized build of your app and writes it to the Bundle subdirectory of your package. Additionally, SwiftPM resources are supported by both carton dev (served as static files) and carton bundle (copied with the rest of the assets), if any package resources are declared in your Package.swift.

New carton package command is introduced, which proxies its subcommands to swift package invocations on the currently-installed toolchain. This may be useful in situations where you'd like to generate an Xcode project file for your app with something like carton package generate-xcodeproj. It would be equivalent to swift package generate-xcodeproj, but invoked with the SwiftWasm toolchain instead of the toolchain supplied by Xcode. Many thanks to @kateinoigakukun for the implementation!

Compatibility with Safari 14 is fixed for carton dev and is maintained for the new carton bundle command as well.

This version of carton ships with new JavaScript runtime compatible with JavaScriptKit 0.7. You should update JavaScriptKit dependency to 0.7 if you had an older version specified in Package.swift of your project.

A regression in carton test was fixed in the latest 5.3 toolchain snapshot, which became the default snapshot version in this version of carton. In general we advise against having a .swift-version file in your project, but if you need one, please specify wasm-5.3-SNAPSHOT-2020-09-25-a snapshot or a later one from the 5.3 branch in this file for carton test to work.

Closed issues:

  • carton crashes when it fails to instantiate TerminalController (#112)
  • Allow carton to use a provided HTML template file (#100)
  • Add static file support (#38)
  • Demo cannot be run on Safari 14 (#25)
  • Implement carton bundle command (#16)

Merged pull requests: