Skip to content

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

License

Notifications You must be signed in to change notification settings

comingAlive/next-wasm-example

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published