Run Swift in browsers

SwiftWasm compiles your Swift code to WebAssembly.

Source on GitHub

View our Swift pull request

Want to keep up with Swift news on your smart speaker? Follow us on Voco.
Or sign up for our mailing list:

Try Swift on WebAssembly now

Compile Swift in the cloud and run in your browser.

Output:

How you can help

Resolve remaining issues

Many features in Swift aren't working on WebAssembly yet.

Want to help? See our pull request for info on what still needs to be done.

Upstream patches

We're working on integrating our patches into the official Swift compiler.

Want to help? See the pull request to see which commits needs to be submitted.

Design web bindings

Wouldn't it be nice to invoke web APIs directly from Swift?

Want to help? Examine similar projects such as Rust's wasm-bindgen or gowebapi's webidl-bind to see how they can be adapted to Swift.

If you would like to help, join us.

Credits

Getting Swift to work on WebAssembly required the hard work of many people:

Thanks.