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][doc] how to start dotnet on WebWorker + demo #95452

Open
2 of 4 tasks
pavelsavara opened this issue Nov 30, 2023 · 6 comments
Open
2 of 4 tasks

[browser][doc] how to start dotnet on WebWorker + demo #95452

pavelsavara opened this issue Nov 30, 2023 · 6 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Nov 30, 2023

For use-cases which don't need C# to interact with the UI, but they just need to calculate some logic in dotnet.

It already worked in Net7 with some fiddling, there is known use in the community since.

It works well in Net8.
We should create demo how to start the single-threaded dotnet on separate WebWorker and how to postMessage json messages to it.

For now it's wasmbrowser template and people have to figure out the WebWorker part themself.

dotnet workload install wasm-tools
dotnet workload install wasm-experimental
dotnet new wasmbrowser
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm labels Nov 30, 2023
@pavelsavara pavelsavara added this to the 9.0.0 milestone Nov 30, 2023
@pavelsavara pavelsavara self-assigned this Nov 30, 2023
@ghost
Copy link

ghost commented Nov 30, 2023

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

Issue Details

For use-cases which don't need C# to interact with the UI, but they just need to calculate some logic in dotnet.

It already worked in Net7 with some fiddling, there is known use in the community since.

It works well in Net8.
We should create demo how to start the single-threaded dotnet on separate WebWorker and how to pass json messages to it.

Author: pavelsavara
Assignees: pavelsavara
Labels:

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

Milestone: 9.0.0

@pavelsavara
Copy link
Member Author

@hiyelbaz
Copy link

https://github.com/Tewr/BlazorWorker

Lack of dotnet 8.0 support...

@pavelsavara
Copy link
Member Author

https://github.com/Tewr/BlazorWorker

Lack of dotnet 8.0 support...

Not anymore https://github.com/Tewr/BlazorWorker/releases/tag/v4.0.0-preview2

@danroth27
Copy link
Member

@pavelsavara @lewing Where should the docs for this go? We put the JSImport/JSExport content in the Blazor docs. Do we want this content to be part of the Blazor docs as well? Are we getting to the point where we really should have a dedicated doc section on .NET runtime capabilities for WebAssembly?

@maraf
Copy link
Member

maraf commented May 17, 2024

Are we getting to the point where we really should have a dedicated doc section on .NET runtime capabilities for WebAssembly?

From my point of view a lot of things apply to both. In a lot of cases Blazor is really an UI library / application framework on top of runtime capabilities. Projecting such relation into docs seems good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

6 participants