[wasm coreclr] enable corerun on nodeJS#119250
Merged
pavelsavara merged 5 commits intodotnet:mainfrom Sep 5, 2025
Merged
Conversation
janvorli
reviewed
Sep 1, 2025
cbb5324 to
5b56511
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enables the corerun host application to work on Node.js for WebAssembly (WASM) CoreCLR builds. The changes implement Node.js-specific functionality and remove browser-specific assumptions to allow running .NET assemblies directly in Node.js environments.
Key changes:
- Replace inline assembly debugger break with Emscripten's debugger function
- Add static linking support for WASM builds with Node.js file system access
- Implement environment variable passing from Node.js to Emscripten runtime
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/coreclr/pal/src/arch/wasm/stubs.cpp |
Replace inline assembly with emscripten_debugger() for proper Node.js debugging |
src/coreclr/hosts/corerun/corerun.js |
Add JavaScript pre-run script to copy Node.js environment variables to Emscripten |
src/coreclr/hosts/corerun/corerun.hpp |
Add WASM-specific conditional compilation to disable dynamic library loading |
src/coreclr/hosts/corerun/corerun.cpp |
Implement static symbol resolution for WASM builds instead of dynamic loading |
src/coreclr/hosts/corerun/CMakeLists.txt |
Configure WASM build with static linking, Node.js file system, and required libraries |
src/coreclr/hosts/CMakeLists.txt |
Enable corerun build for WASM targets alongside existing corewasmrun |
docs/workflow/building/coreclr/wasm.md |
Update documentation to reflect corerun usage instead of corewasmrun for Node.js |
AaronRobinsonMSFT
approved these changes
Sep 4, 2025
Member
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
This looks great, thank you. Please address the CMake feedback and then let's get this merged!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.