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

chore: Update to latest runtime main #718

Merged
merged 30 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4e2f427
chore: Update to latest runtime main
jeromelaban May 11, 2023
b60778b
chore: Update binaries for emsdk 3.1.34
jeromelaban May 11, 2023
0e767fc
chore: Adjust for updated emscripten
jeromelaban May 11, 2023
fe9692c
chore: Always enable simd
jeromelaban May 11, 2023
84beb42
ci: Adjust for simd enabled runtime
jeromelaban May 12, 2023
5a41fdf
ci: Adjust for threaded runtime
jeromelaban May 11, 2023
6173862
ci: adjust typo
jeromelaban May 12, 2023
b2b97a2
ci: Adjust for invalid png compilation
jeromelaban May 12, 2023
a88d0f1
wip
jeromelaban May 12, 2023
fb07133
chore: Disable LLVM generation from .bc files to avoid wasm-ld valida…
jeromelaban May 12, 2023
dfcf17a
chore: Restore AOT profiler
jeromelaban May 12, 2023
84c4966
chore: Adjust for incorrect minification
jeromelaban May 12, 2023
02bc53a
chore: Update raytracer aot profile for net8 pre 4
jeromelaban May 12, 2023
f82c65a
chore: Adjust ray tracer text
jeromelaban May 13, 2023
fdd05cb
chore: Adjust for net6 compatbililty
jeromelaban May 13, 2023
3c24e7f
chore: Remove deprecated boostrapper timezone suppor
jeromelaban May 13, 2023
6e67740
ci: Bump to .NET 8 Preview 3 SDK
jeromelaban May 13, 2023
4f4244c
ci: Adjust solution filters
jeromelaban May 13, 2023
c73e61f
ci: Adjust server target roll forward
jeromelaban May 13, 2023
167c71f
ci: Adjust roll forward to latest major
jeromelaban May 13, 2023
2896bb9
ci: Adjust paths, base .NET version
jeromelaban May 13, 2023
411917f
choe: Adjust binding compatibility
jeromelaban May 15, 2023
2c7359f
ci: Adjust for invalid threading AOT tests
jeromelaban May 15, 2023
83b6db2
ci: Adjust invalid build step
jeromelaban May 15, 2023
4cb999d
chore: Fail on profile generation and linker enabled
jeromelaban May 15, 2023
fb61db9
ci: Adjust for AOT threads test disabled
jeromelaban May 15, 2023
199f0d2
chore: Disable linker on profile generation
jeromelaban May 15, 2023
1ae5ffd
chore: Update runtime for require support
jeromelaban May 16, 2023
9624b45
chore: Adjust runtime options, documentation
jeromelaban May 17, 2023
4464709
chore: Adjust doc
jeromelaban May 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 20 additions & 15 deletions .vsts-ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: 7.0.100
version: 8.0.100-preview.3.23178.7
includePreviewVersions: true

- task: NuGetToolInstaller@0
Expand Down Expand Up @@ -74,26 +74,31 @@ jobs:

- bash: |
$(build.sourcesdirectory)/build/scripts/run-tests.sh \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threads/bin/Release/net6.0/dist" \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threads/bin/Release/net8.0/dist" \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests" "http://localhost:8000/"
displayName: Threading UI Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

## Threads AOT validation
- bash: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true "/p:WasmShellWebAppBasePath=/"
displayName: Build Threads AOT test
### Threads AOT validation
#- bash: |
# cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
# dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
# dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true "/p:WasmShellWebAppBasePath=/"
# displayName: Build Threads AOT test
#
#- bash: |
# $(build.sourcesdirectory)/build/scripts/run-tests.sh \
# "$(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot/bin/Release/net6.0/dist" \
# "$(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests" "http://localhost:8000/"
# displayName: Threading AOT UI Tests
# env:
# BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
#
# Disabled for the following error: https://github.com/unoplatform/Uno.Wasm.Bootstrap/issues/724
# BROWSER LOG: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module,
# but after startup the value is only looked for on a local variable of that name))

- bash: |
$(build.sourcesdirectory)/build/scripts/run-tests.sh \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot/bin/Release/net6.0/dist" \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests" "http://localhost:8000/"
displayName: Threading AOT UI Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

## SWA sub-path validation
- bash: |
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: 7.0.100
version: 8.0.100-preview.3.23178.7
includePreviewVersions: true

- bash: |
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: 7.0.100
version: 8.0.100-preview.3.23178.7
includePreviewVersions: true

- template: build/ci/gitversion.yml
Expand Down
39 changes: 21 additions & 18 deletions .vsts-ci-windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: 7.0.100
version: 8.0.100-preview.3.23178.7
includePreviewVersions: true

- pwsh: |
Expand Down Expand Up @@ -187,30 +187,33 @@ jobs:

- pwsh: |
$(build.sourcesdirectory)\build\scripts\run-tests-windows.ps1 `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threads\bin\Release\net6.0\dist" `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threads\bin\Release\net8.0\dist" `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threading.UITests" `
"http://localhost:8000/"

displayName: Threading Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

# Thread AOT test
- pwsh: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /bl:$(build.artifactstagingdirectory)/sample.threads-win.binlog
displayName: Build Threading AOT Sample

- pwsh: |
$(build.sourcesdirectory)\build\scripts\run-tests-windows.ps1 `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threads.Aot\bin\Release\net6.0\dist" `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threading.UITests" `
"http://localhost:8000/"

displayName: Threading AOT Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
# # Thread AOT test
# - pwsh: |
# cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
# dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
# dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /bl:$(build.artifactstagingdirectory)/sample.threads-win.binlog
# displayName: Build Threading AOT Sample

# - pwsh: |
# $(build.sourcesdirectory)\build\scripts\run-tests-windows.ps1 `
# "$(build.sourcesdirectory)\src\Uno.Wasm.Threads.Aot\bin\Release\net6.0\dist" `
# "$(build.sourcesdirectory)\src\Uno.Wasm.Threading.UITests" `
# "http://localhost:8000/"
# displayName: Threading AOT Tests
# env:
# BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
#
# Disabled for the following error: https://github.com/unoplatform/Uno.Wasm.Bootstrap/issues/724
# BROWSER LOG: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module,
# but after startup the value is only looked for on a local variable of that name))

- task: PublishBuildArtifacts@1
condition: always()
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci-wsl-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: 7.0.100
version: 8.0.100-preview.3.23178.7
includePreviewVersions: true

- pwsh: |
Expand Down
2 changes: 1 addition & 1 deletion build/ci/dotnet-install.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
DotNetVersion: '6.0.200'
DotNetVersion: '7.0.200'

steps:

Expand Down
10 changes: 4 additions & 6 deletions doc/features-module-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,15 @@ If the bitcode file to be added is named `libTest.bc` or `libTest.a`, the follow
| `libTest.bc/2.0.9/st/libTest.bc` | Emscripten 2.0.9 and later, single threaded |
| `libTest.bc/2.0.6/mt/libTest.bc` | Emscripten 2.0.6 and later, multi threaded |
| `libTest.bc/2.0.9/mt/libTest.bc` | Emscripten 2.0.9 and later, multi threaded |
| `libTest.bc/2.0.6/st,simd/libTest.bc` | Emscripten 2.0.6 and later, single threaded with SIMD |
| `libTest.bc/2.0.9/st,simd/libTest.bc` | Emscripten 2.0.9 and later, single threaded with SIMD |
| `libTest.bc/2.0.6/mt,simd/libTest.bc` | Emscripten 2.0.6 and later, multi threaded with SIMD |
| `libTest.bc/2.0.9/mt,simd/libTest.bc` | Emscripten 2.0.9 and later, multi threaded with SIMD |

Based on the emscripten version used by the .NET runtime and the enabled runtime features, the bootstrapper will choose the closest matching version.

As of bootstrapper 7.0, the following runtime features are supported:
As of bootstrapper 8.0, the following runtime features are supported:
- `st` for Single Threaded runtime
- `mt` for Multi Threaded runtime
- `simd` for SIMD enabled runtime

## Deprecated features
`simd` is deprecated for .NET 8 and is always enabled

#### Static Linking additional emcc flags
Static linking may also require some additional emscripten flags, for instance when using libpng. In such a case, add the following to your project:
Expand Down
22 changes: 21 additions & 1 deletion doc/runtime-execution-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ This mode is the slowest, but allows for great flexibility and debugging, as wel

The linker mode can also be completely disabled for troubleshooting, as this will not impact the wasm payload size.

### Jiterpreter mode

This mode is a hybrid between the interpreter and the AOT modes, where the interpreter is used to execute the code, but the JIT engine is used to generate some WebAssembly code on the fly. This mode is generally faster than the interpreter, but slower than the AOT mode.

To enable this mode, use the following option:
```xml
<PropertyGroup>
<WasmShellEnableJiterpreter>true</WasmShellEnableJiterpreter>
</PropertyGroup>
```

Additionally, some options can be used to fine tune the Jiterpreter mode, using options found [in this file](https://github.com/dotnet/runtime/blob/6a047a9aec7a36039cffac61186b04bd3f16dbe0/src/mono/mono/utils/options-def.h#L86-L114):
```xml
<PropertyGroup>
<WasmShellRuntimeOptions>--jiterpreter-stats-enable --jiterpreter-estimate-heat</WasmShellRuntimeOptions>
</PropertyGroup>
```

Finally, runtime statistics are maintained by the jiterpreter and can be displayed by running `INTERNAL.jiterpreter_dump_stats()` in the browser debugger console.

### Mixed Interpreter and AOT Mode
This mode enable AOT compilation for most of the assemblies, with [some specific exceptions](https://github.com/dotnet/runtime/issues/50609).

Expand All @@ -30,7 +50,7 @@ This mode is generally prefered to FullAOT as it allows to load arbitrary assemb
## Required configuration for AOT, Mixed Mode or static linking on Linux
- Ubuntu 18.04+ or a [container](https://hub.docker.com/r/unoplatform/wasm-build)
- A [stable build of mono](https://www.mono-project.com/download/stable/#download-lin)
- A [.NET SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) >= 5.0
- A [.NET SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) >= 6.0
- ninja: `apt-get install ninja-build`

The easiest is to build using the environment provided by the [unoplatform/wasm-build docker image](https://hub.docker.com/r/unoplatform/wasm-build).
Expand Down
1 change: 0 additions & 1 deletion src/Uno.Wasm.Bootstrap-msbuild-only.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"Uno.Wasm.Threading.UITests\\Uno.Wasm.Threading.UITests.njsproj",
"Uno.Wasm.Threads.Aot\\Uno.Wasm.Threads.Aot.csproj",
"Uno.Wasm.Threads\\Uno.Wasm.Threads.csproj",
"Uno.Wasm.TimezoneData\\Uno.Wasm.TimezoneData.csproj",
"Uno.WasmSample WithSpace Aot\\Uno.WasmSample.WithSpace.Aot.csproj",
"Uno.WasmSample WithSpace\\Uno.WasmSample.WithSpace.csproj",
"WasmAot.UITests\\WasmAot.UITests.njsproj"
Expand Down
1 change: 0 additions & 1 deletion src/Uno.Wasm.Bootstrap-netcore-only.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"Uno.Wasm.Threads.Aot\\Uno.Wasm.Threads.Aot.csproj",
"Uno.Wasm.Threads.Shared\\Uno.Wasm.Threads.Shared.shproj",
"Uno.Wasm.Threads\\Uno.Wasm.Threads.csproj",
"Uno.Wasm.TimezoneData\\Uno.Wasm.TimezoneData.csproj",
"Uno.WasmSample WithSpace Aot\\Uno.WasmSample.WithSpace.Aot.csproj",
"Uno.WasmSample WithSpace\\Uno.WasmSample.WithSpace.csproj"
]
Expand Down
1 change: 0 additions & 1 deletion src/Uno.Wasm.Bootstrap-paclages-only.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"Uno.Wasm.LogProfiler\\Uno.Wasm.LogProfiler.csproj",
"Uno.Wasm.MetadataUpdater\\Uno.Wasm.MetadataUpdater.csproj",
"Uno.Wasm.Packager\\Uno.Wasm.Packager.csproj",
"Uno.Wasm.TimezoneData\\Uno.Wasm.TimezoneData.csproj",
"Uno.Wasm.Tuner\\Uno.Wasm.Tuner.csproj"
]
}
Expand Down
6 changes: 0 additions & 6 deletions src/Uno.Wasm.Bootstrap.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Uno.Wasm.Threading.UITests"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Wasm.Bootstrap.DevServer", "Uno.Wasm.Bootstrap.DevServer\Uno.Wasm.Bootstrap.DevServer.csproj", "{6ACB62AD-0DFF-4593-A7EC-5A4E21DA4ABE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Wasm.TimezoneData", "Uno.Wasm.TimezoneData\Uno.Wasm.TimezoneData.csproj", "{FE9D3339-36EB-4B4F-9534-EA742FD59C2C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Wasm.StaticLinking", "Uno.Wasm.Static Linking\Uno.Wasm.StaticLinking.csproj", "{EBCB3142-593E-4815-915D-3B88B75161C1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.WasmSample.WithSpace.Aot", "Uno.WasmSample WithSpace Aot\Uno.WasmSample.WithSpace.Aot.csproj", "{359A63C4-C5D0-4011-8C39-89D23190B22F}"
Expand Down Expand Up @@ -203,10 +201,6 @@ Global
{6ACB62AD-0DFF-4593-A7EC-5A4E21DA4ABE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ACB62AD-0DFF-4593-A7EC-5A4E21DA4ABE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6ACB62AD-0DFF-4593-A7EC-5A4E21DA4ABE}.Release|Any CPU.Build.0 = Release|Any CPU
{FE9D3339-36EB-4B4F-9534-EA742FD59C2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE9D3339-36EB-4B4F-9534-EA742FD59C2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE9D3339-36EB-4B4F-9534-EA742FD59C2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE9D3339-36EB-4B4F-9534-EA742FD59C2C}.Release|Any CPU.Build.0 = Release|Any CPU
{EBCB3142-593E-4815-915D-3B88B75161C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBCB3142-593E-4815-915D-3B88B75161C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBCB3142-593E-4815-915D-3B88B75161C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.Wasm.Bootstrap/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Uno.Wasm.Bootstrap
internal class Constants
{
public const string DefaultDotnetRuntimeSdkUrl = "https://unowasmbootstrap.azureedge.net/runtime/"
+ "dotnet-runtime-wasm-linux-b8dd0e0-33cb335386d-3312947179-Release.zip";
+ "dotnet-runtime-wasm-linux-6f9021c-8adbca4855b-4993542190-Release.zip";

/// <summary>
/// Min version of the emscripten SDK. Must be aligned with dotnet/runtime SDK build in <see cref="NetCoreWasmSDKUri"/>.
Expand All @@ -16,6 +16,6 @@ internal class Constants
/// The emscripten version use by dotnet/runtime can be found here:
/// https://github.com/dotnet/runtime/blob/f9bb1673708ca840da0e71f9a9444ea9b0d31911/src/mono/wasm/Makefile#L32
/// </remarks>
public static Version DotnetRuntimeEmscriptenVersion { get; } = new Version("3.1.12");
public static Version DotnetRuntimeEmscriptenVersion { get; } = new Version("3.1.34");
}
}
Loading