This is a simple example of how to use Rust to create a WebAssembly module that supports JavaScript-Promise Integration (JSPI).
Also, configure your browser to enable JSPI. For Chrome, you need to configure the experimental feature.
npm run wasm
to build the Rust code into a WebAssembly module.npm run dev
to start a Vite dev server.- Navigate to
http://localhost:5173/
to see JSPI in action.
No explanation provided for now. See js/main.ts
for details.
MIT