Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

A simple boilerplate to get WebAssembly (WASM) code generated by Rust and bundled by Webpack!

License

Notifications You must be signed in to change notification settings

yamafaktory/rust-wasm-webpack

Repository files navigation

rust-wasm-webpack 🏎️ Build Status npm version Standard - JavaScript Style Guide

A simple boilerplate to get WebAssembly (WASM) code generated by Rust and bundled by Webpack!

This project now uses the awesome rust-native-wasm-loader 🚀.

Prerequisite

To get started, we need to install rustup, the Rust toolchain installer:

curl https://sh.rustup.rs -sSf | sh

Please refer to its documentation.

Usage

Setup

First, install the necessary NodeJS dependencies:

yarn

The next step will update to the latest Rust nightly, add the wasm32-unknown-unknown toolchain and install wasm-gc from git. The latter is a small command to clean a wasm module and remove all unneeded exports, imports, functions, etc.

yarn setup

Build

You can skip this step and directly launch the dev server.

yarn build

Launch the dev server

yarn start

Go to http://localhost:9000/ and enjoy!

License

Released under the MIT license by Davy Duperron.

About

A simple boilerplate to get WebAssembly (WASM) code generated by Rust and bundled by Webpack!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •