Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 583 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 583 Bytes

Next.js + WebAssembly example

This example shows how to build a typed and optimized WebAssembly module from Rust and dynamically import it inside of Next.js.

How to use

Clone repo and install dependencies:

git clone https://github.com/comingAlive/next-wasm-example.git
cd next-wasm-example

npm install
# or
yarn

To compile Rust code src/lib.rs to pkg module you'll have to install Rust. Then run:

npm run build-rust
# or
yarn build-rust

Start Next.js app:

npm run dev
# or
yarn dev