Skip to content
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] Minimal blazor.boot.json integration #84296

Merged
merged 18 commits into from
Apr 18, 2023
Merged

Conversation

maraf
Copy link
Member

@maraf maraf commented Apr 4, 2023

  • Support side-by-side loading from mono-config.json and blazor.boot.json produced by Wasm SDK
  • This is a first step in JS/TS integration with blazor booting
  • Updates wasmbrowser template to use Wasm SDK (next cycle, needs wasmapphost+wbt updates)
  • Integrates WebAssemblyResourceLoader from Blazor
  • Missing blazor features that will be considered in follow-ups
    • appSettings, reason: we don't have a C# API to actualy use them
    • JSInitializers, reason: too complicated at the moment

@maraf maraf added this to the 8.0.0 milestone Apr 4, 2023
@maraf maraf self-assigned this Apr 4, 2023
@ghost
Copy link

ghost commented Apr 4, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
  • TBD
Author: maraf
Assignees: maraf
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@maraf maraf changed the title [browser] Blazor.boot.json integration [browser] Minimal blazor.boot.json integration Apr 11, 2023
Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

I would prefer to dissolve this new code into our folder structure and code style and drop blazor folder.

src/mono/wasm/runtime/run-outer.ts Show resolved Hide resolved
import { BootJsonData } from "./BootConfig";

let testAnchor: HTMLAnchorElement;
export function toAbsoluteUri(relativeUri: string): string {
Copy link
Member

Choose a reason for hiding this comment

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

This will fail in nodeJS

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, I haven't tried running it on console yet

Copy link
Member Author

Choose a reason for hiding this comment

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

I keen to not have this experience (=Wasm SDK + boot.json) on node at the moment

}
}

function getICUResourceName(bootConfig: BootJsonData, culture: string | undefined): string {
Copy link
Member

Choose a reason for hiding this comment

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

We probably already have this code in icu.ts

src/mono/wasm/runtime/blazor/BootConfig.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/blazor/WebAssemblyConfigLoader.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/blazor/WebAssemblyResourceLoader.ts Outdated Show resolved Hide resolved
@maraf
Copy link
Member Author

maraf commented Apr 12, 2023

I would prefer to dissolve this new code into our folder structure and code style and drop blazor folder.

I definitely agree. Please consider the current state as a WIP

@maraf maraf marked this pull request as ready for review April 17, 2023 20:14
@maraf maraf requested review from lewing and kg as code owners April 17, 2023 20:14
Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

LGTM as work in progress, expecting further cleanup and unification in subsequent PRs

@maraf
Copy link
Member Author

maraf commented Apr 18, 2023

Failures are not related

@maraf maraf merged commit 5100b5b into dotnet:main Apr 18, 2023
@maraf maraf deleted the WasmBootConfig branch April 26, 2023 15:23
@ghost ghost locked as resolved and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants