-
Install
wasm-bindgen-cli
and 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-pack
is not used because it does not support--keep-debug
option. 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.rs
under 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.
-
Notifications
You must be signed in to change notification settings - Fork 0
License
jat001/rust-wasm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.