This repository shows how to use wasm-pack WASM modules in MetaMask Snaps.
First, build your Rust project used as a ./snap dependency:
cd rust-lib
wasm-pack build --target no-modulesThen, you can build and run your snap:
cd snap
yarn install
yarn build
yarn serveIn order to run this demo, we need to install a specific MetaMask Flask version: