Compiling from Rust to WebAssembly - WebAssembly
developer.mozilla.org·5d
🌐WebAssembly
Preview
Report Post

Rust and WebAssembly use cases

There are two main use cases for Rust and WebAssembly:

  • Build an entire application — an entire web app based in Rust.
  • Build a part of an application — using Rust in an existing JavaScript frontend.

For now, the Rust team is focusing on the latter case, and so that’s what we cover here. For the former case, check out projects like yew and leptos.

In this tutorial, we build a package using wasm-pack, a tool for building JavaScript packages in Rust. This package will contain only WebAssembly and JavaScript code, so users won’t need Rust installed. They may not even notice that it’s written in Rust.

[Rust Environment Setup](#rust_en…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help