https://github.com/rustwasm/deprecated_rust_wasm_template
Deprecated in favor of rustwasm/wasm-pack-template or rustwasm/rust-webpack-template
https://github.com/rustwasm/deprecated_rust_wasm_template
boilerplate rust rust-wasm template wasm
Last synced: about 1 year ago
JSON representation
Deprecated in favor of rustwasm/wasm-pack-template or rustwasm/rust-webpack-template
- Host: GitHub
- URL: https://github.com/rustwasm/deprecated_rust_wasm_template
- Owner: rustwasm
- License: apache-2.0
- Created: 2018-05-22T19:56:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-30T20:41:46.000Z (almost 8 years ago)
- Last Synced: 2025-04-09T10:01:50.794Z (about 1 year ago)
- Topics: boilerplate, rust, rust-wasm, template, wasm
- Language: Shell
- Homepage:
- Size: 40 KB
- Stars: 102
- Watchers: 8
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
**DEPRECATED**: Use rustwasm/wasm-pack-template for libraries and rustwasm/rust-webpack-template for webapps with webpack.
# Rust 🦀 and WebAssembly 🕸 Template 🏗
[](https://travis-ci.org/rustwasm/rust_wasm_template)
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`](https://github.com/rustwasm/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`](https://github.com/WebAssembly/binaryen) to shrink the
`.wasm` binary's code size and also speed it up at runtime.
* ✔ Bundles your JS with [Webpack](https://webpack.js.org/).
* ✔ Serve your `.wasm` and JS locally with [Webpack's
dev-server](https://github.com/webpack/webpack-dev-server/).
* ✔ Better debugging with [Rust panics forwarded to
`console.error`](https://github.com/rustwasm/console_error_panic_hook).
* ✔ Optionally use [`wee_alloc`](https://github.com/rustwasm/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`](./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](https://travis-ci.org/profile/).