Skip to content

Conversation

@pavelsavara
Copy link
Member

so that linker features work

@pavelsavara pavelsavara added this to the 11.0.0 milestone Jan 18, 2026
@pavelsavara pavelsavara self-assigned this Jan 18, 2026
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm labels Jan 18, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the CoreCLR initialization process for browser/WASM to pass runtime configuration options directly as function parameters instead of through environment variables. This enables linker features to work properly by making runtime options available during initialization.

Changes:

  • Updated CoreCLR initialization to accept runtime configuration properties as parameters instead of environment variables
  • Added support for merging runtimeConfig.runtimeOptions.configProperties in loader configuration
  • Introduced new BrowserHost_CreateHostContract function to separate host contract creation from initialization

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/native/libs/Common/JavaScript/types/ems-ambient.ts Updated type definitions to add CharPtrPtr import and new function signatures for CreateHostContract and InitializeCoreCLR
src/native/corehost/browserhost/loader/config.ts Added merging and normalization logic for runtimeConfig.runtimeOptions.configProperties
src/native/corehost/browserhost/libBrowserHost.footer.js Refactored to remove environment variable setup from JS layer and updated dependency declarations
src/native/corehost/browserhost/host/host.ts Implemented new initializeCoreCLR that builds runtime properties and passes them to C++ via parameters
src/native/corehost/browserhost/browserhost.cpp Refactored to accept properties as function parameters instead of reading from environment variables

Copy link
Member

@radekdoulik radekdoulik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@pavelsavara
Copy link
Member Author

/ba-g known issues

@pavelsavara pavelsavara merged commit 9202b4c into dotnet:main Jan 19, 2026
162 of 168 checks passed
@pavelsavara pavelsavara deleted the browser_runtime_options branch January 19, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants