Development Guide

Forum posts



The main repository of this project. Forked from apple/swift. We are tracking upstream changes using pull

Branching scheme

  • swiftwasm is the main develop branch
  • master is a mirror of the master branch of the upstream apple/master repository. This branch is necessary to avoid some issues
  • swiftwasm-release/5.3 is the branch where 5.3 release of SwiftWasm is prepared.
  • release/5.3 is a mirror of the upstream release/5.3 branch.


Forked from apple/llvm-project.

swiftwasm branch is based on swift/master branch of apple/llvm-project.

Please see


Build script and patches for building ICU project for WebAssembly

We are sending patches to upstream repository.


swiftwasm/wasi-sdk and swiftwasm/wasi-libc

Forked from WebAssembly/wasi-sdk and WebAssembly/wasi-libc.

We fork them to build wasi-sysroot with pthread header. There aren't so many diff from upstream.

How to build

First, checkout the project source code.

$ mkdir swiftwasm-source
$ cd swiftwasm-source
$ git clone
$ ./swift/utils/update-checkout --scheme wasm --clone

Before building Swift, please install required dependencies.

# On macOS
$ ./utils/webassembly/macos/
# On Linux
$ ./utils/webassembly/linux/

We support both Linux and macOS to build Swift. These script wraps ./utils/build-script to simplify build options. You can pass additional build-script options through these scripts.

# On macOS
$ ./utils/webassembly/ -R
# On Linux
$ ./utils/webassembly/ -R

If you want to get more information about build system, please feel free to ask @kateinoigakukun on Twitter.

Development Tips


Compilation time of LLVM project is very long, so we recommend to cache the artifact using sccache

Use sccache to cache build artifacts


When you want to debug a WebAssembly binary, wasminspect is very helpful to investigate.