The first stable toolchain release of SwiftWasm!
This is the first public release of SwiftWasm toolchain, available as a signed .pkg installer for macOS. Also via swiftenv-compatible archives and Docker for Intel-based Ubuntu 18.04 and 20.04. Our focus is on providing essential Swift features for the WebAssembly platform. Distributions supplied with this release are our most stable yet, and no breaking changes are expected for 5.3 releases anymore.
The standard library and core libraries
The Swift standard library is fully available on WebAssembly platform.
The standard library right now depends on WASI, which is a modular system interface for WebAssembly. We use the wasi-libc implementation, which you can also use in your Swift apps with a simple
import WASILibc statement. However, we are going to make the WASI dependency optional in the future.
Foundation / XCTest
Foundation and XCTest are also available on WebAssembly, but in a limited capacity.
Please refer to our Foundation and XCTest guides for more details.
The Tokamak UI framework is a cross-platform implementation of the SwiftUI API. We currently only support WebAssembly/DOM with a lot of API parts covered, and static HTML rendering on macOS/Linux. Get started with our browser apps guide that lists necessary steps to create a simple browser app with Tokamak.
All-in-one builder, test runner, and bundler for SwiftWasm
carton is a build tool designed specifically for SwiftWasm. It is similar to webpack.js, but no configuration and dependencies (except Swift itself to build
carton) are required. It's also our recommended way to install SwiftWasm as it downloads and unpacks our toolchain and SDK automatically for you.
We maintain a GitHub Action that includes the SwiftWasm toolchain and
carton for your continuous integration needs.