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

Enable wasm multi-threading #456

Merged
merged 2 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"skipRestore": {
"longName": "skip-restore",
"shortName": "skip"
},
},
"themeService": {
"longName": "theme-service",
"shortName": "theme-service"
Expand All @@ -113,6 +113,10 @@
"longName": "default-branch-name",
"shortName": "branch"
},
"wasmMultiThreading": {
"longName": "wasm-multi-threading",
"shortName": "wasm-multi-threading"
},
"unoWinUIVersion": {
"isHidden": true
},
Expand Down
13 changes: 13 additions & 0 deletions src/Uno.Templates/content/unoapp/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,13 @@
"datatype": "bool",
"defaultValue": "false"
},
"wasmMultiThreading": {
"displayName": "WASM Multi-Threading",
"description": "Configures application to use multi-threading in WebAssembly",
"type": "parameter",
"datatype": "bool",
"defaultValue": "false"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
Expand Down Expand Up @@ -1113,6 +1120,12 @@
"datatype": "bool",
"value": "useMvux || useMvvm"
},
"useWasmMultiThreading": {
"type": "computed",
"datatype": "bool",
// NOTE: This doesn't work well in net7.0
"value": "(tfm != 'net7.0' && wasmMultiThreading)"
},
"useGtk": {
"type": "computed",
"datatype": "bool",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
https://aka.platform.uno/wasm-deeplink
-->
<WasmShellWebAppBasePath>/</WasmShellWebAppBasePath>
<!--#if (useWasmMultiThreading)-->

<!--
Enable WebAssembly Threads
https://aka.platform.uno/wasm-threading

NOTE: This feature is still considered experimental by the dotnet team
-->
<WasmShellEnableThreads>true</WasmShellEnableThreads>
<WasmShellPThreadsPoolSize>8</WasmShellPThreadsPoolSize>
<!--#endif-->
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
Expand Down
Loading