- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
[browser] runtimeConfig via boot config #115113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Tagging subscribers to 'arch-wasm': @lewing | 
a6a243d    to
    b9bdea8      
    Compare
  
    feabc48    to
    ac0e359      
    Compare
  
    8c54cf7    to
    3a1d153      
    Compare
  
    There was a problem hiding this 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 extends the boot configuration for browser-based apps by adding support for runtime configuration properties, refactoring runtime config parsing, and updating related tests. Key changes include:
- Adding the runtimeConfig property (and supporting types) to BootJsonData.
- Refactoring the runtime configuration loading in startup.ts and driver.c.
- Updating MSBuild targets and test projects to use the new runtime configuration mechanism.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs | Added runtimeConfig property and new types for runtime configuration data. | 
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Added a new test case branch for HttpNoStreamingTest with runtime config access. | 
| src/mono/wasm/testassets/WasmBasicTestApp/App/HttpTest.cs | Introduced HttpNoStreamingTest logic using the runtime config switch. | 
| src/mono/wasm/testassets/WasmBasicTestApp/App/EnvVariablesTest.cs | Updated logging format in environment variable test output. | 
| src/mono/wasm/build/* and src/mono/wasi/build/* | Removed references to RuntimeConfigParserTask; updated targets to use ProjectRuntimeConfigFilePath. | 
| src/mono/browser/runtime/* | Updated types and startup logic to convert runtime config properties from JSON to char** arrays and adjust the native runtime initialization. | 
| src/mono/browser/runtime/driver.c | Updated the mono_wasm_load_runtime signature and initialization to reflect runtime config changes. | 
| src/mono/browser/runtime/cwraps.ts | Updated the function signature for mono_wasm_load_runtime. | 
| Other test and project files | Adjusted tests and project definitions to align with runtime config changes. | 
| test failures look relevant | 
BootJsonDatawithruntimeConfigwhich matches just theruntimeOptions.configPropertiespart of*.runtimeconfig.jsonRuntimeConfigJsonPathinGenerateWasmBootJsonand inWasmAppBuilderchar**instartup.tsinitialize_runtime()out of scopeFixes #97449
Fixes #112442
Together with dotnet/sdk#48916