docs/workflow/wasm-documentation.md
This document serves as a guide for contributors to the WebAssembly implementation in the dotnet/runtime repository. It provides links and references to technical documentation, workflows, and resources relevant to developing and maintaining WebAssembly support within this codebase.
.NET WebAssembly allows you to run .NET applications in web browsers and other WebAssembly-compatible environments. The runtime uses the Mono runtime to execute .NET bytecode compiled to WebAssembly.
For debugging instructions including VS Code and Chrome DevTools setup, see the WebAssembly Debugging Reference.
After building the runtime, use the generate-coreclr-helpers script for your platform (.cmd or .sh) in src/tasks/WasmAppBuilder to [re]generate the call helpers in src/coreclr/vm/wasm.
For testing WebAssembly implementation changes end-to-end, see the testing documentation.
Located in src/mono/sample/wasm/:
wasm-tools: Production WebAssembly tools and optimizationwasm-experimental: Experimental features and templatesSee the WebAssembly Debugging Reference for detailed instructions on debugging library tests locally.
See the Building for WebAssembly section above for build instructions for different targets.
Use Wasm.Build.Tests or Wasi.Build.Tests. See the Wasm.Build.Tests README for detailed instructions.
See the Threading Support documentation for detailed multi-threading configuration and limitations.
See the Testing Libraries on WebAssembly documentation for JavaScript engine installation and usage.
See the WebAssembly Debugging documentation for symbol configuration.
/p:RunAOTCompilation=true/p:EnableAggressiveTrimming=true/p:JSEngine=SpiderMonkey/p:Outerloop=true.eslintrc.jsnpm run lint in src/mono/browser/runtimeWhen making changes that affect native code or build configuration, see Building the Repo for detailed instructions.
Then test your changes with Testing the Repo using the relevant test suites.
When updating WebAssembly documentation:
For questions or additional help, see the main workflow documentation or ask in the dotnet/runtime repository discussions.