• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

Deprecated in favor of rustwasm/wasm-pack-template or rustwasm/rust-webpack-template

DEPRECATED: Use rustwasm/wasm-pack-template for libraries and rustwasm/rust-webpack-template for webapps with webpack.

Rust πŸ¦€ and WebAssembly πŸ•Έ Template πŸ—

Build Status

This is a template to jump-start your Rust and WebAssembly project and let you hit the ground running.

πŸ› What's Inside?

  • βœ” The latest wasm-bindgen for light and seamless bidirectional communication between Rust and JavaScript. Import JavaScript things into Rust and export Rust things to JavaScript.

  • βœ” Boilerplate for builds, optimizing, and post-processing:

    • βœ” Generates the JS interface to your .wasm binary with the appropriate wasm-bindgen invocation.

    • βœ” Runs wasm-opt to shrink the .wasm binary's code size and also speed it up at runtime.

    • βœ” Bundles your JS with Webpack.

  • βœ” Serve your .wasm and JS locally with Webpack's dev-server.

  • βœ” Better debugging with Rust panics forwarded to console.error.

  • βœ” Optionally use wee_alloc as the global allocator, to help keep your code size footprint small.

  • βœ” Boilerplate for writing #[test]s and #[bench]es for the native target.

  • βœ” Travis CI integration already set up. Make sure you never break your tests or your WebAssembly builds.

🀸 Using this Template

First, install cargo-generate:

cargo install cargo-generate

Second, generate a new project with this repository as a template:

cargo-generate --git https://github.com/rustwasm/rust_wasm_template.git

Answer the prompts and then you should be good to go! Check out your new CONTRIBUTING.md for details on building and project organization.

Enabling Travis CI

The Travis CI configuration is 100% pre-configured, and all you need to do is enable CI for the repo on your profile page.

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

awesome-rust-and-webassembly

Awesome Rust and WebAssembly projects, libraries, tools, and resources
627
star
9

wasm-pack-template

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

rust-webpack-template

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

create-wasm-app

npm init template for consuming rustwasm pkgs
JavaScript
492
star
12

walrus

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

console_error_panic_hook

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

wasm_game_of_life

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

wasm-snip

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

rust-parcel-template

Kickstart your Rust, WebAssembly, and Parcel project!
Rust
156
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