Releases: swiftwasm/carton
0.4.1
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
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:
- Propagate test build/run failures in the exit code (#61) via @MaxDesiatov
- Update static.zip, automate its release process (#60) via @MaxDesiatov
- Upgrade JavaScriptKit to 0.5.0 (#59) via @carson-katri
- Add
carton init
command (#54) via @carson-katri - Fix
carton test
output skipping lines (#53) via @MaxDesiatov - Implement
carton sdk local
subcommand (#40) via @RayZhao1998 - Add
list
flag andtestCases
argument totest
(#52) via @MaxDesiatov - Implement simple wasmer runner for
test
command (#51) via @MaxDesiatov - Always pass --enable-test-discovery to swift build (#49) via @MaxDesiatov
- Fix watcher missing root directories (#48) via @MaxDesiatov
- Update to Vapor 4.15.2, fix formatting (#47) via @MaxDesiatov
- Add sources to watcher per target (#46) via @JaapWijnen
- Avoid displaying destination files as SDK versions (#44) via @MaxDesiatov
- Automatically link Foundation w/ destination.json (#41) via @MaxDesiatov
- Use Combine instead of OpenCombine where possible (#39) via @MaxDesiatov
- Add separate CartonHelpers/SwiftToolchain modules (#35) via @MaxDesiatov
- Use
from
instead ofupToNextMinor
for OpenCombine (#34) via @MaxDesiatov - Bump OpenCombine version to 0.10.0 (#33) via @broadwaylamb
0.3.1
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:
- Fix backtrace logging for async startWasiTask (#30) via @MaxDesiatov
- Sort the output of
carton sdk versions
(#29) via @MaxDesiatov
0.3.0
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:
- Log archive size when downloading new SDK (#28) via @MaxDesiatov
- Update WASI polyfill, print a backtrace on crash (#27) via @MaxDesiatov
- Support
carton sdk versions
(#21) via @RayZhao1998 - Add a --release flag to the carton dev command (#19) via @ratranqu
- Add --destination option to the
carton dev
command (#18) via @ratranqu
0.2.0
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
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
This is a bugfix release that fixes the dev.js
bundle broken in 0.1.3.
0.1.3
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
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
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.