-
Install
wasm-bindgen-cliand Chrome extension C/C++ DevTools Support (DWARF) (only compatible with Chrome Canary and Dev version, MSEdge is not supported). -
Build
cargo build --target wasm32-unknown-unknown wasm-bindgen --keep-debug --web --out-dir pkg target/wasm32-unknown-unknown/debug/rust_wasm.wasm
wasm-packis not used because it does not support--keep-debugoption. See rustwasm/wasm-pack#1351. -
Serve
python3 -m http.server
Or use any other http server you like.
-
Open
http://localhost:8000 -
Open Chrome DevTools and go to Sources tab.
You should see
top->file://->${workspaceFolder}/src->lib.rsunder Page pane. -
VSCode is also supported. Use VSCode Insiders version and install WebAssembly DWARF Debugging extension.
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
jat001/rust-wasm
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|