-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[wasm] First attempt at a wasm app host #68696
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
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing Issue Detailsnull
|
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ff995f4 to
cad622c
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d72a7c9 to
5f77c3e
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
thaystg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, and also I tested and it works :)
|
The failures are known, and have issues filed. |
First attempt at implementing a wasm app host
Regular dotnet apps can be run with
dotnet run. But this is not the case forwasm apps. We use
xharnessto run the test apps that we generate for librarytests.
Templates for browser, and console wasm projects were added recently, but they
have to be run manually by either invoking a v8 script, or running a
http-serverin the bundle directory. Though to use a debugger with thisrequires starting the debug proxy separately, and connecting few bits.
WasmAppHost
This PR adds a new
WasmAppHost, which can be used throughdotnet run:it can run "wasm app" from it's
AppBundledirectory, using various hostslike
v8,node, or a browser. An example use:The console template project is run with
nodeby default.it supports a
--debugparameter, which (for the browser case) would startupa webserver, and the debug proxy for Chrome, and firefox.
dotnet runwith wasm samples, and library tests too.How do I try this out?
You'll need a dotnet with the updated packs. For now, you can use:
.. which would install a sdk in
artifacts/bin/dotnet-workloadwith all the packs installed.dotnet new wasmconsole, ordotnet new wasmbrowser.Debugging library tests
If the runtime was built in
Releaseconfig, then you need to add-p:DebuggerSupport=true, so the pdbs would get deployedAnd use
--debugto start the debuggerOpening the url will show a
Run testsbutton, which you can click after connecting with the IDE, to start running the testsNotes, and TODO
WasmAppHost, along with the debug proxy are bundled in theWebAssembly.Sdkpack right now.additional support adding in the Sdk.
launchSettings.json, similar to blazorWasmAppHostdepends on host config inruntimeconfig.json, which can becontrolled by a
runtimeconfig.template.jsonin the project directory.Needs more tests, cleanup,
--helpfor command line argumentsapp-support.*jsin templates, andtest-main.jsneed more work to share the codeFixes #67236