Developer Environment
VSCode
We recommend VSCode. We'll add guides for other editors/IDEs in the future.
- Install VSCode
VSCode > File > Open Workspace from File... >
zaplib/zaplib.code-workspace
- VSCode will prompt you to install our recommended extensions
- We recommend NOT installing the official Rust extension since it conflicts with
matklad.rust-analyzer
. If you already have it installed, it's best to disable it. - Feel free to copy the settings from
zaplib.code-workspace
to your own projects! - Go to the "Run and Debug" tab in VSCode. In the dropdown at the top of that panel, you you should see a bunch of debug configs. They use CodeLLDB as the debugger - so you can add breakpoints right in VSCode.
Chrome debugging
To get Rust source maps when doing local development in Chrome:
- Install the WASM Debugginer Extension.
Chrome DevTools > Settings (gear-icon âš™ in top-right corner) > Experiments > WebAssembly Debugging: Enable DWARF support
(More info)
Note: these source maps read from hardcoded local file paths, so they'll only work on the computer that you've compiled on.
TypeScript
Zaplib exports TypeScript types that should be picked up naturally. Check out the TypeScript page of our docs for more information.