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

Configure the Blazor WASM runtime #30321

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Configure the Blazor WASM runtime #30321

merged 2 commits into from
Sep 12, 2023

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Sep 12, 2023

Fixes #30320

Confirm what I called these in case I'm making up my own 🦖 Blazor framework .... again! 😆

To configure the .NET WebAssembly runtime, use the configureRuntime function with the dotnet runtime host builder.

❓ ... dotnet ... the "runtime host builder"?

UPDATE: On this PR, I had configureRuntime property. I've updated that to "function" on a different PR.

@maraf ... I took your test example for the doc coverage. If either you or Pavel have something better for the example, I'm 👂.

Finally, this is used to configure quite a few runtime-y things. I see what looks like an incomplete list at ...

dotnet/aspnetcore#49264 (comment)

What do we want to say about that (or cross-link for it)?


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/fundamentals/startup.md ASP.NET Core Blazor startup
aspnetcore/release-notes/aspnetcore-8.0.md What's new in ASP.NET Core 8.0

@guardrex
Copy link
Collaborator Author

I'm going to go ahead and merge because we can't hold up the release notes topic at this time. We're on a HIGH doc churn day with RC1 🏃🏃🏃🏃😰.

I'll patch any updates into the text/example that you see fit. Please leave your comments here.

@guardrex guardrex merged commit 05e943c into main Sep 12, 2023
@guardrex guardrex deleted the guardrex-patch-2 branch September 12, 2023 14:59
@maraf
Copy link
Member

maraf commented Sep 18, 2023

@guardrex I think the same is good enough. I should also show the other part, eg

Blazor.runtime.getAssemblyExports(...);

The Blazor.runtime gives access to Runtime API of running .NET https://github.com/dotnet/aspnetcore/blob/cdbb59f6a7ee4cc2a7727a4555c53f4578a89276/src/Components/Web.JS/src/GlobalExports.ts#L42, returned type is https://github.com/dotnet/aspnetcore/blob/cdbb59f6a7ee4cc2a7727a4555c53f4578a89276/src/Components/Web.JS/%40types/dotnet/dotnet.d.ts#L343-L384

@guardrex
Copy link
Collaborator Author

I added it after this PR on #30339 ...

The .NET runtime instance can be accessed from Blazor.runtime.

Live topic section ...

https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/startup?view=aspnetcore-8.0#configure-the-net-webassembly-runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure the Blazor WASM runtime 8.0
2 participants