-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[browser] Support AppContext switches on runtime #97449
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsAppContext switches defined in csproj are not available on runtime
On other platforms, they end up in
|
That works for browser but we will have the same issue in wasi where there is no json parser. |
That's true. We can use the binary format for WASI and we bundle it into wasm file even for browser, but I would like to avoid distributing it as a separate file for browser scenario |
Mono has a task that converts rutnimeconfig.json files into a binary blob at build time so you don't need to do JSON parsing at execution time the binary blob can be passed by the driver to
This is used by xamarin-android, for example: |
I need this to work in order to implement #111680 and it's P1 goal After discussion with @maraf I learned that
runtime/src/tasks/MonoTargetsTasks/RuntimeConfigParser/RuntimeConfigParser.cs Lines 110 to 120 in b9adf8d
runtime/src/mono/browser/runtime/driver.c Lines 205 to 220 in b9adf8d
runtime/src/libraries/System.Private.CoreLib/src/System/AppContext.cs Lines 145 to 153 in b9adf8d
That gives us following implementation options B) For consistency with other Mono platforms, fix I prefer A) at this time |
AppContext switches defined in csproj are not available on runtime
On other platforms, they end up in
runtime.config.json
. We should put them intoblazor.boot.json
as that's the only config required (for both wasmbrowser and blazor experience)The text was updated successfully, but these errors were encountered: