Rust and WebAssembly

Rust and WebAssembly

rustwasm.github.io

1

About this website

The Rust and WebAssembly Working Group provides the official tooling and documentation for compiling Rust code to WebAssembly, enabling high-performance web applications. The ecosystem centers on three core tools: wasm-bindgen (a library and code generator that facilitates high-level interactions between Rust and JavaScript, generating JavaScript bindings for Rust functions and structs and vice versa, handling type conversions for strings, numbers, arrays, closures, Promises, DOM objects, and custom types), wasm-pack (a one-stop build and packaging tool that compiles Rust to WebAssembly, generates JavaScript bindings via wasm-bindgen, creates npm-compatible packages, and handles publishing to npm or local installation, with support for bundler targets, web targets, and Node.js targets), and cargo-web (a legacy alternative build tool). Key capabilities include: direct DOM manipulation from Rust (via web-sys crate providing bindings to all Web APIs), high-performance computation in the browser (image processing, cryptographic operations, physics simulations, audio processing, video editing), sharing code between web and native (compiling the same Rust codebase to both WebAssembly for browser and native binaries for desktop), server-side rendering with Rust on Edge platforms (Cloudflare Workers, Fastly Compute, Deno Deploy), and integration with JavaScript frameworks (React, Vue, Svelte, Angular via custom elements or hooks). The Rust WebAssembly ecosystem also includes wasm-opt (Binaryen-based optimizer), twiggy (code size profiler), and wasm-snippets. As of 2026, wasm-bindgen has over 7,900 stars and wasm-pack has over 6,400 stars.

Tags & Categories

Categories

Tags

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!