This repository is a simple, organic means of coordinating work on using Rust and WebAssembly together.
Compiling Rust to WebAssembly should be the best choice for fast code for the Web.
JavaScript Web applications struggle to attain reliable performance. JavaScript's dynamic type system and garbage collection pauses don't help. Seemingly small code changes can result in drastic performance regressions if you accidentally wander off the JIT's happy path.
Rust gives programmers low-level control and reliable performance. It is free from the non-deterministic garbage collection pauses that plague JavaScript. Programmers have control over indirection, monomorphization, and memory layout.
And now we can bring Rust's advantages to the Web with WebAssembly.
Rust is particularly well-suited for the Web.
Rust's minuscule runtime enables small .wasm
sizes and incremental or partial
adoption.
-
Small
.wasm
sizes: Code size is incredibly important since the.wasm
must be downloaded over the network. -
Incremental or partial adoption: Existing code bases don't need to be thrown away. Programmers can start by porting their most performance-sensitive JavaScript functions to Rust to gain immediate benefits. And they can even stop there if they want to, because Rust plays well with others.
Furthermore, Rust has many of the amenities that Web developers have come to expect:
-
strong package management with
cargo
, -
expressive (and zero-cost!) abstractions,
-
and a welcoming community 😊
We envision the pipeline that fits Rust into JavaScript package management and bundler ecosystem to look something like this:
Get involved with the Rust and WebAssembly community in just three easy steps!
Chat with the Rust and WebAssembly community on IRC at #rust-wasm
on
irc.mozilla.org
.
If you don't have an IRC client of choice already, you can use the Mibbit Web IRC client.
Say "hello" and introduce yourself!
Read our short Rust and WebAssembly book, complete its tutorial, and compile some Rust into WebAssembly. If you run into a paper cut or roadblock, let us know by filing an issue!
We are building a Rust and WebAssembly future where:
- The Web is the primary target.
- Rust plays nice with JavaScript, and can surgically replace a performance-sensitive JavaScript module or function without throwing away the existing code base.
We are not focusing on (but still encourage others to experiment with) scenarios where:
- The Web is not the primary target (e.g. WebAssembly as a universal binary format, or an operating system that runs WebAsssembly processes instead of native code).
- A Web application is written in pure Rust, without integrating with any JavaScript.
We meet on Google Hangouts every week to track progress, give status
updates, and discuss issues. We coordinate meetings with issues labeled
"meeting" in the rustwasm/team
repository.
First get your feet wet by tackling one of these issues:
-
Issues labeled "good first issue" in the
rustwasm/*
repositories -
Issues labeled "help wanted" in the
rustwasm/*
repositories.
Then help us make progress on the working group goals. To learn more about or
contribute towards a particular goal, read its goals/*.md
page and its "How to
Help" section. If you have any questions about a goal, contact its owner.
Goal | More Information |
---|---|
wasm-bindgen Ecosystem |
goals/wasm-bindgen-ecosystem.md |
Publishing and Dependencies | goals/publishing-and-dependencies.md |
Bundler Integration | goals/bundler-integration.md |
Book, Documentation, Tutorials | goals/book-documentation-tutorials.md |
Website | goals/website.md |
Debugging | goals/debugging.md |
Project Templates | goals/project-templates.md |
Testing | goals/testing.md |
Benchmarking | goals/benchmarking.md |
Finally, if you've gotten this far, see GOVERNANCE.md#membership
for information on becoming an official member of the working group!