Step 1: Install Rustup
Install Rustup. We'll use it to install dependencies. If you already installed Rustup, you can update to the latest version.
rustup update
Step 2: Install Development Tools
# Install Clippy
rustup component add clippy
# Install rustfmt
rustup component add rustfmt
It runs wasm-pack build
to create necessary files for publishing a npm package.
It runs the end-to-end test with headless browsers and Node.js. The browsers are:
- Chrome
- Firefox
- Safari
You'll need to have the browsers installed in your machine to run the test script.
It creates a tarball and publishes on npm.
It runs Clippy to lint and fix the source code.
It runs rustfmt to format Rust code according to community style guidelines.
wasm-bindgen
for communicating between WebAssembly and JavaScript.console_error_panic_hook
for logging panic messages to the developer console.wee_alloc
, an allocator optimized for small code size.LICENSE-APACHE
andLICENSE-MIT
: most Rust projects are licensed this way, so these are included for you
📚 Read this template tutorial & other
wasm-pack
tutorials online to learn more aboutwasm-pack
.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.