Skip to content

[browser] Minimal blazor.boot.json integration - #84296

Merged
maraf merged 18 commits into
dotnet:mainfrom
maraf:WasmBootConfig
Apr 18, 2023
Merged

[browser] Minimal blazor.boot.json integration#84296
maraf merged 18 commits into
dotnet:mainfrom
maraf:WasmBootConfig

Conversation

@maraf

@marafmaraf commented Apr 4, 2023

Copy link
Copy Markdown
Member
  • 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

@marafmaraf added this to the 8.0.0 milestone Apr 4, 2023
@marafmaraf self-assigned this Apr 4, 2023
@ghost

ghost commented Apr 4, 2023

Copy link
Copy Markdown

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

@marafmaraf changed the title [browser] Blazor.boot.json integration[browser] Minimal blazor.boot.json integrationApr 11, 2023

@pavelsavarapavelsavara left a comment

Copy link
Copy Markdown
Member

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.

Comment threadsrc/mono/wasm/runtime/run-outer.ts
import { BootJsonData } from "./BootConfig";

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

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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
Copy Markdown
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

Comment threadsrc/mono/wasm/runtime/blazor/BootConfig.ts Outdated
Comment threadsrc/mono/wasm/runtime/blazor/WebAssemblyConfigLoader.ts Outdated
Comment threadsrc/mono/wasm/runtime/blazor/WebAssemblyResourceLoader.ts Outdated
@maraf

maraf commented Apr 12, 2023

Copy link
Copy Markdown
MemberAuthor

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 kg and lewing as code ownersApril 17, 2023 20:14
Comment threadsrc/mono/wasm/runtime/blazor/_Integration.ts

@pavelsavarapavelsavara left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

Failures are not related

@maraf
maraf merged commit 5100b5b into dotnet:mainApr 18, 2023
@maraf
maraf deleted the WasmBootConfig branch April 26, 2023 15:23
@ghostghost locked as resolved and limited conversation to collaborators May 26, 2023
Sign up for freeto 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

@maraf@pavelsavara@ilonatommy