• Stars
    star
    627
  • Rank 71,654 (Top 2 %)
  • Language
  • License
    Other
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Awesome Rust and WebAssembly projects, libraries, tools, and resources

Awesome Rust and Webassembly

A list of awesome Rust and WebAssembly projects, libraries, tools, and resources.

Contributing

If you want to contribute, read this.

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Table of Contents


Applications

Visualization

  • macro_railroad — Generating "railroad style" syntax diagrams for macro_rules!() macros. Diagrams are generated fully automatically from rust-source as Scalable Vector Graphics, using customizable CSS for layout.

  • snowhash — Procedurally generate a unique snowflake from a hash.

  • wasmbooth — Video effect booth written in Rust and WebAssembly.

Development Tools

Build and Workflow Orchestration

  • wasm-pack wasm-pack seeks to be a one-stop shop for building and working with Rust-generated WebAssembly that you would like to interoperate with JavaScript, on the Web or with Node.js. wasm-pack helps you build and publish Rust-generated WebAssembly to the npm registry to be used alongside any other JavaScript package in workflows that you already use.

Inspecting .wasm Binaries

  • wasm-objdump — Print low-level details about a .wasm binary and each of its sections. Also supports disassembling into the WAT text format. It's like objdump but for WebAssembly.

  • wasm-nm — List the imported, exported, and private function symbols defined within a .wasm binary. It's like nm but for WebAssembly.

Optimizing .wasm Binaries

  • wasm-gc — A small tool to garbage collect a WebAssembly module and remove all unneeded exports, imports, functions, etc. This is effectively a --gc-sections linker flag for WebAssembly.

  • wasm-opt — The wasm-opt tool reads WebAssembly as input, runs transformation, optimization, and/or instrumentation passes on it, and then emits the transformed WebAssembly as output. Running it on the .wasm binaries produced by LLVM by way of rustc will usually create .wasm binaries that are both smaller and execute faster.

  • wasm-snip wasm-snip replaces a WebAssembly function's body with an unreachable instruction. This is useful for forcibly removing Rust's panicking infrastructure in non-debug production builds.

Size Profiling .wasm Binaries

  • twiggy twiggy is a code size profiler for .wasm binaries. It analyzes a binary's call graph to answer questions about which functions take up the most space.

Polyfilling WebAssembly

  • wasm2js — The wasm2js tool compiles WebAssembly into "almost asm.js". This is great for supporting browsers that don't have a WebAssembly implementation, such as Internet Explorer 11.

JavaScript Toolchains and Bundler Plugins

  • rollup-plugin-rust — A Rollup plugin that loads Rust code so it can be interop with Javascript base project.

  • rs-jest — Jest preprocessor/transformer for Rust. Build for seamless integration with a project that use rollup-plugin-rust.

  • rust-native-wasm-loader — A Webpack loader that loads Rust code as a WebAssembly module. It uses the native Rust support for compiling to wasm32 and does not require Emscripten.

  • wasm-pack-plugin — Webpack plugin for Rust and wasm-pack.

Libraries

Allocation and Memory Management

  • wee_alloc — The Wasm-Enabled, Elfin Allocator. A small (~1K uncompressed .wasm) allocator implementation for when code size is a greater concern than allocation performance.

Error Handling

  • console_error_panic_hook — This crate lets you debug panics on wasm32-unknown-unknown by providing a panic hook that forwards panic messages to console.error.

Games

  • gate — Gate is a game development library tailored to 2D pixel-art games, written in Rust.

Interfacing with JavaScript and the DOM

  • js-sys — Raw wasm-bindgen imports for all the JavaScript global types and methods, such as Object, Function, eval, etc. These APIs are portable across all standard ECMAScript environments, not just the Web, such as Node.js.

  • wasm-bindgen wasm-bindgen facilitates high-level interactions between Rust and JavaScript. It allows one to import JavaScript things into Rust and export Rust things to JavaScript.

  • wasm-bindgen-futures wasm-bindgen-futures is a bridge connecting JavaSript Promises and Rust Futures. It can convert in both directions and is useful when working with asynchronous tasks in Rust, and allows interacting with DOM events and I/O operations.

Interpreting and Compiling WebAssembly

  • cranelift-wasm — Compile WebAssembly to the native host's machine code. Part of the Cranelift (né Cretonne) code generator project.

  • wasmer Build Status — Universal WebAssembly Runtime

  • wasmi — An embeddable WebAssembly interpreter.

  • wasmtime — Standalone JIT-style runtime for WebAssembly

Parsing and Generating .wasm Binaries

  • parity-wasm — Low-level WebAssembly format library for serializing, deserializing, and building .wasm binaries. Good support for well-known custom sections, such as the "names" section.

  • wasmparser — A simple, event-driven library for parsing WebAssembly binary files.

Resources

More Repositories

1

wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
Rust
7,655
star
2

wasm-pack

📦✨ your favorite rust -> wasm workflow tool!
Rust
6,173
star
3

gloo

A modular toolkit for building fast, reliable Web applications and libraries with Rust and WASM
Rust
1,773
star
4

book

The Rust and WebAssembly Book
Handlebars
1,734
star
5

team

A point of coordination for all things Rust and WebAssembly
1,436
star
6

twiggy

Twiggy🌱 is a code size profiler
Rust
1,254
star
7

wee_alloc

The Wasm-Enabled, Elfin Allocator
Rust
666
star
8

wasm-pack-template

a template for starting a rust-wasm project to be used with wasm-pack
Rust
618
star
9

rust-webpack-template

Kickstart your Rust, WebAssembly, and Webpack project!
JavaScript
562
star
10

create-wasm-app

npm init template for consuming rustwasm pkgs
JavaScript
492
star
11

walrus

Walrus is a WebAssembly transformation library 🌊🐘
Rust
377
star
12

console_error_panic_hook

A panic hook for wasm32-unknown-unknown that logs panics with console.error
Rust
317
star
13

wasm_game_of_life

A Rust and WebAssembly tutorial implementing the Game of Life
Rust
276
star
14

wasm-snip

`wasm-snip` replaces a WebAssembly function's body with an `unreachable`
Rust
218
star
15

rust-parcel-template

Kickstart your Rust, WebAssembly, and Parcel project!
Rust
156
star
16

deprecated_rust_wasm_template

Deprecated in favor of rustwasm/wasm-pack-template or rustwasm/rust-webpack-template
Shell
102
star
17

wasm-tracing-allocator

A global allocator for Wasm that traces allocations and deallocations for debugging purposes.
Rust
101
star
18

rustwasm.github.io

Rust and WebAssembly website! 🦀 + 🕸
HTML
68
star
19

weedle

A WebIDL Parser
WebIDL
43
star
20

rfcs

The Rust and WebAssembly RFCs
Shell
39
star
21

wasm-webidl-bindings

Read, write, and manipulate the Wasm WebIDL bindings custom section
Rust
38
star
22

binary-install

Rust
10
star
23

wasm-weight-tracker

Tracking Rust and WebAssembly sizes over time
Rust
10
star
24

hello-wasm-bindgen

a presentation introducing wasm-bindgen
JavaScript
8
star
25

sfhtml5-rust-and-wasm

JavaScript
4
star
26

.github

Default issue templates, CONTRIBUTING.md, etc...
2
star
27

wasm-weight-tracker-data

WIP
1
star