Open maraf opened 7 months ago
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | maraf |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `area-Build-mono`, `os-browser` |
Milestone: | 9.0.0 |
AppContext switches defined in csproj are not available on runtime
<ItemGroup> ... <RuntimeHostConfigurationOption Include="System.Runtime.OptionalFeatureBehavior" Condition="'$(UnoptimizedUserFacingBehavior)' != ''" Value="$(UnoptimizedUserFacingBehavior)" Link="false" /> ... </ItemGroup>
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)
That works for browser but we will have the same issue in wasi where there is no json parser.
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 https://github.com/dotnet/runtime/blob/main/src/tasks/MonoTargetsTasks/RuntimeConfigParser/RuntimeConfigParser.cs
the binary blob can be passed by the driver to monovm_runtimeconfig_initialize
:
This is used by xamarin-android, for example:
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)