-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Smooth out support for running .NET from JS via WebAssembly #77191
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsA common scenario for running .NET on WebAssembly is when you want to reuse a .NET library from an existing JS app. In this scenario, the user isn't creating an app from scratch. Instead they are integrating a .NET library into an existing JS based app, like an Angular/React/Vue app that will run in a browser or in a Node.js based app. Since the app is preexisting, it already has a defined dev workflow. For example, many frontend JS frameworks use an NPM and WebPack based build system and the WebPack dev server for hosting the app locally. Any .NET code needs to be integrated into existing HTML and JS files and hosted as static web assets along with the rest of the JS app. Some issues that could be addressed to make this experience better:
|
We could use either |
I'm working on a sample of integrating a .NET library into a react component wrapped as npm package and installed into a target react application. |
Moving the rest of items to .NET 9 |
A common scenario for running .NET on WebAssembly is when you want to reuse a .NET library from an existing JS app. In this scenario, the user isn't creating an app from scratch. Instead they are integrating a .NET library into an existing JS based app, like an Angular/React/Vue app that will run in a browser or in a Node.js based app.
Since the app is preexisting, it already has a defined dev workflow. For example, many frontend JS frameworks use an NPM and WebPack based build system and the WebPack dev server for hosting the app locally. Any .NET code needs to be integrated into existing HTML and JS files and hosted as static web assets along with the rest of the JS app.
Some issues that could be addressed to make this experience better:
WasmMainJSPath
property is currently required even though a main.js file might not be needed. The user may be importing dotnet.js directly into their existing app. It seems like this property should be optional.<OutputType>Exe</OutputType>
and a main entry point is currently required. For calling into a .NET library from JS it seems like a library project should be allowed. [browser] Suport for OutputType Library #89577The text was updated successfully, but these errors were encountered: