Getting started - Hello wasm-pack! (original ) (raw )
1. Introduction
2. Quickstart
3. Prerequisites
3.1. npm (optional)
3.2. considerations
3.3. Non-rustup setups
4. Commands
4.1. new
4.2. build
4.3. test
4.4. pack and publish
4.5. init (DEPRECATED)
5. Tutorials
5.1. Hybrid applications with Webpack
5.1.1. Getting started
5.1.2. Using your library
5.2. npm browser packages
5.2.1. Getting started
5.2.1.1. Manual Setup
5.2.2. Template deep dive
5.2.2.1. Cargo.toml
5.2.2.2. src/lib.rs
5.2.2.3. src/utils.rs
5.2.2.4. wee_alloc
5.2.2.5. tests/web.rs
5.2.3. Building your project
5.2.4. Testing your project
5.2.5. Packaging and publishing
5.2.6. Using your library
6. Cargo.toml Configuration
7. Contributing
Hello wasm-pack!Getting Started
You can create a new Rust-WebAssembly webpack project by using the rustwasm webpack-template .
Run:
npm init rust-webpack my-app
The last argument will be your project name. After you run the command, you will have a directory with a new project, ready to go. We'll talk about what's been included in this template further in this guide.