Skip to content

Simple boilerplate code for a rust-wasm project using the wasm-pack crate.

Notifications You must be signed in to change notification settings

jwhogg/rust-wasm-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

⚙️🦀 Rust-WASM Boilerplate

Using theRust and WebAssembly Working Group'swasm-packcrate, which lets you compile rust code into WASM, and provides an interface with JavaScript.

📖 Project built from thisMozilla Developer Documentation Tutorial

Getting Started

  1. Clone the Repo:
    git clone https://github /jwhogg/rust-wasm-boilerplate
    
  2. Build for web using a bundler: in the main dir:
    wasm-pack build --target bundler
    
  3. Install webpack:
    npm i -D webpack@5 webpack-cli@5 webpack-dev-server@4 copy-webpack-plugin@11
    
  4. Serve the site:
    cd site
    
    npm run serve
    
  5. All done! Navigate tohttp://localhost:8080,and you should see a pop-up:Hello, WebAssembly with npm!

About

Simple boilerplate code for a rust-wasm project using the wasm-pack crate.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published