Skip to content

Commit b77c25a

Browse files
authored
Merge pull request #134 from unoplatform/dev/jela/net9
chore: Update to latest main
2 parents a4c9e09 + 8d2be0a commit b77c25a

22 files changed

+535
-926
lines changed

.github/workflows/runtime-ci.yml

+203-170
Large diffs are not rendered by default.

build/gitversion.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
assembly-versioning-scheme: MajorMinorPatch
2+
mode: Mainline
3+
4+
branches:
5+
main:
6+
mode: ContinuousDeployment
7+
regex: main
8+
tag: dev
9+
increment: Minor
10+
11+
pull-request:
12+
regex: ^(pull|pull\-requests|pr)[/-]
13+
mode: ContinuousDeployment
14+
tag: PullRequest
15+
increment: Inherit
16+
17+
stable:
18+
regex: release/stable/.*
19+
tag: ''
20+
increment: Patch
21+
source-branches: ['main']
22+
is-mainline: true
23+
24+
beta:
25+
mode: ContinuousDeployment
26+
regex: release/beta/.*
27+
tag: 'beta'
28+
increment: inherit
29+
source-branches: ['main']
30+
31+
dev:
32+
mode: ContinuousDeployment
33+
regex: dev/.*?/(.*?)
34+
tag: dev.{BranchName}
35+
source-branches: ['main', 'release', 'projects', 'feature']
36+
increment: inherit
37+
38+
projects:
39+
tag: proj-{BranchName}
40+
regex: projects/(.*?)
41+
source-branches: ['main']
42+
increment: inherit
43+
44+
feature:
45+
tag: feature.{BranchName}
46+
regex: feature/(.*?)
47+
source-branches: ['main']
48+
increment: inherit
49+
50+
ignore:
51+
sha: []

build/signing/SignClient.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"SignClient": {
3+
"AzureAd": {
4+
"AADInstance": "https://login.microsoftonline.com/",
5+
"ClientId": "80441c68-7fd8-4866-8dd1-8c78ff585a8a",
6+
"TenantId": "a297d6c0-b635-41a3-b1e3-558efe71e413"
7+
},
8+
"Service": {
9+
"Url": "https://uno-signservice.azurewebsites.net",
10+
"ResourceId": "https://SignService.platformuno.onmicrosoft.com/6dd8824b-6147-4b02-a1af-ea83b0ffebdb"
11+
}
12+
}
13+
}

build/signing/sign-package.ps1

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$currentDirectory = split-path $MyInvocation.MyCommand.Definition
2+
3+
# See if we have the ClientSecret available
4+
if ([string]::IsNullOrEmpty($env:SignClientSecret)) {
5+
Write-Host "Client Secret not found, not signing packages"
6+
return;
7+
}
8+
9+
dotnet tool install --tool-path . SignClient
10+
11+
# Setup Variables we need to pass into the sign client tool
12+
$appSettings = "$currentDirectory\SignClient.json"
13+
14+
$filesToSign = Get-ChildItem -Recurse $Env:ArtifactDirectory\* -Include *.nupkg,*.vsix | Select-Object -ExpandProperty FullName
15+
16+
foreach ($fileToSign in $filesToSign) {
17+
Write-Host "Submitting $fileToSign for signing"
18+
.\SignClient 'sign' -c $appSettings -i $fileToSign -r $env:SignClientUser -s $env:SignClientSecret -n "$env:SignPackageName" -d "$env:SignPackageDescription" -u "$env:build_repository_uri"
19+
Write-Host "Finished signing $fileToSign"
20+
}
21+
22+
Write-Host "Sign-package complete"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6+
<IsPackable>true</IsPackable>
7+
<IncludeBuildOutput>false</IncludeBuildOutput>
8+
<PackageProjectUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</PackageProjectUrl>
9+
<RepositoryUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</RepositoryUrl>
10+
<Description>.NET Ahead of Time Compiler for WebAssembly</Description>
11+
<Copyright>Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform inc. - all rights reserved</Copyright>
12+
<NoWarn>NU5100;NU5128</NoWarn>
13+
<PackageId>Uno.NETCore.App.Runtime.AOT.$(NETCoreSdkPortableRuntimeIdentifier).Cross.browser-wasm</PackageId>
14+
</PropertyGroup>
15+
16+
<ItemGroup>
17+
<None Include="tools/**" Pack="true" PackagePath="tools" />
18+
</ItemGroup>
19+
20+
<Target Name="DownloadAndSetPackageIcon" BeforeTargets="_GetPackageFiles">
21+
<PropertyGroup>
22+
<IconUrl>https://uno-assets.platform.uno/logos/uno.png</IconUrl>
23+
</PropertyGroup>
24+
25+
<DownloadFile SourceUrl="$(IconUrl)" DestinationFolder="$(IntermediateOutputPath)">
26+
<Output TaskParameter="DownloadedFile" PropertyName="UnoPackageDownloadedIcon" />
27+
</DownloadFile>
28+
29+
<PropertyGroup>
30+
<PackageIcon>$([System.IO.Path]::GetFileName($(UnoPackageDownloadedIcon)))</PackageIcon>
31+
</PropertyGroup>
32+
33+
<ItemGroup>
34+
<None Include="$(UnoPackageDownloadedIcon)" Pack="true" PackagePath="\" Visible="false" />
35+
</ItemGroup>
36+
</Target>
37+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6+
<IsPackable>true</IsPackable>
7+
<IncludeBuildOutput>false</IncludeBuildOutput>
8+
<PackageProjectUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</PackageProjectUrl>
9+
<RepositoryUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</RepositoryUrl>
10+
<Description>.NET SDK for WebAssembly</Description>
11+
<Copyright>Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform inc. - all rights reserved</Copyright>
12+
<NoWarn>NU5100;NU5128</NoWarn>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<None Include="sdk-multithread/**" Pack="true" PackagePath="data/multithread" />
17+
<None Include="sdk-singlethread/**" Pack="true" PackagePath="data/singlethread " />
18+
</ItemGroup>
19+
20+
<Target Name="DownloadAndSetPackageIcon" BeforeTargets="_GetPackageFiles">
21+
<PropertyGroup>
22+
<IconUrl>https://uno-assets.platform.uno/logos/uno.png</IconUrl>
23+
</PropertyGroup>
24+
25+
<DownloadFile SourceUrl="$(IconUrl)" DestinationFolder="$(IntermediateOutputPath)">
26+
<Output TaskParameter="DownloadedFile" PropertyName="UnoPackageDownloadedIcon" />
27+
</DownloadFile>
28+
29+
<PropertyGroup>
30+
<PackageIcon>$([System.IO.Path]::GetFileName($(UnoPackageDownloadedIcon)))</PackageIcon>
31+
</PropertyGroup>
32+
33+
<ItemGroup>
34+
<None Include="$(UnoPackageDownloadedIcon)" Pack="true" PackagePath="\" Visible="false" />
35+
</ItemGroup>
36+
</Target>
37+
</Project>

patches/0006-enable-log-profiler.patch patches.temp/0006-enable-log-profiler.patch

+20-20
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Subject: [PATCH] enable log profiler
1010
src/mono/mono/profiler/CMakeLists.txt | 7 +++++++
1111
src/mono/mono/profiler/helper.c | 6 ++++++
1212
src/mono/mono/profiler/log.c | 18 +++++++++++++++++-
13-
src/mono/wasm/runtime/profiler.ts | 9 +++++++--
14-
src/mono/wasm/runtime/startup.ts | 6 +++++-
15-
src/mono/wasm/runtime/types/internal.ts | 5 +++++
13+
src/mono/browser/runtime/profiler.ts | 9 +++++++--
14+
src/mono/browser/runtime/startup.ts | 6 +++++-
15+
src/mono/browser/runtime/types/internal.ts | 5 +++++
1616
9 files changed, 51 insertions(+), 5 deletions(-)
1717

1818
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
@@ -170,17 +170,17 @@ index 1aa33e9c40e..eff4aef5de0 100644
170170
MONO_API void
171171
mono_profiler_init_log (const char *desc);
172172

173-
diff --git a/src/mono/wasm/runtime/profiler.ts b/src/mono/wasm/runtime/profiler.ts
173+
diff --git a/src/mono/browser/runtime/profiler.ts b/src/mono/browser/runtime/profiler.ts
174174
index da627b50ec4..c2e4db95746 100644
175-
--- a/src/mono/wasm/runtime/profiler.ts
176-
+++ b/src/mono/wasm/runtime/profiler.ts
175+
--- a/src/mono/browser/runtime/profiler.ts
176+
+++ b/src/mono/browser/runtime/profiler.ts
177177
@@ -1,8 +1,8 @@
178178
// Licensed to the .NET Foundation under one or more agreements.
179179
// The .NET Foundation licenses this file to you under the MIT license.
180180

181-
-import { ENVIRONMENT_IS_WEB, linkerEnableAotProfiler, linkerEnableBrowserProfiler, mono_assert, runtimeHelpers } from "./globals";
181+
-import { ENVIRONMENT_IS_WEB, mono_assert, runtimeHelpers } from "./globals";
182182
-import { MonoMethod, AOTProfilerOptions, BrowserProfilerOptions } from "./types/internal";
183-
+import { ENVIRONMENT_IS_WEB, linkerEnableAotProfiler, linkerEnableBrowserProfiler, mono_assert, Module, runtimeHelpers } from "./globals";
183+
+import { ENVIRONMENT_IS_WEB, mono_assert, Module, runtimeHelpers } from "./globals";
184184
+import { MonoMethod, AOTProfilerOptions, BrowserProfilerOptions, LogProfilerOptions } from "./types/internal";
185185
import { profiler_c_functions as cwraps } from "./cwraps";
186186
import { utf8ToString } from "./strings";
@@ -195,12 +195,12 @@ index da627b50ec4..c2e4db95746 100644
195195
+ Module.ccall("mono_wasm_load_profiler_log", null, ["string"], [options.configuration]);
196196
+}
197197
\ No newline at end of file
198-
diff --git a/src/mono/wasm/runtime/startup.ts b/src/mono/wasm/runtime/startup.ts
198+
diff --git a/src/mono/browser/runtime/startup.ts b/src/mono/browser/runtime/startup.ts
199199
index e9eee44f0de..3f867a9741e 100644
200-
--- a/src/mono/wasm/runtime/startup.ts
201-
+++ b/src/mono/wasm/runtime/startup.ts
200+
--- a/src/mono/browser/runtime/startup.ts
201+
+++ b/src/mono/browser/runtime/startup.ts
202202
@@ -9,7 +9,7 @@ import { disableLegacyJsInterop, ENVIRONMENT_IS_PTHREAD, exportedRuntimeAPI, INT
203-
import cwraps, { init_c_exports } from "./cwraps";
203+
import cwraps, { init_c_exports, threads_c_functions as tcwraps } from "./cwraps";
204204
import { mono_wasm_raise_debug_event, mono_wasm_runtime_ready } from "./debug";
205205
import { toBase64StringImpl } from "./base64";
206206
-import { mono_wasm_init_aot_profiler, mono_wasm_init_browser_profiler } from "./profiler";
@@ -216,13 +216,13 @@ index e9eee44f0de..3f867a9741e 100644
216216
+ mono_wasm_init_log_profiler(runtimeHelpers.config.logProfilerOptions);
217217
+ }
218218
+
219-
// Threads early are not supported with memory snapshot. See below how we enable them later.
220-
// Please disable startupMemoryCache in order to be able to diagnose or pause runtime startup.
221-
if (MonoWasmThreads && !runtimeHelpers.config.startupMemoryCache) {
222-
diff --git a/src/mono/wasm/runtime/types/internal.ts b/src/mono/wasm/runtime/types/internal.ts
219+
if (WasmEnableThreads) {
220+
runtimeHelpers.deputyWorker.thread!.postMessageToWorker({
221+
type:"deputyThread",
222+
diff --git a/src/mono/browser/runtime/types/internal.ts b/src/mono/browser/runtime/types/internal.ts
223223
index f2dba23fe73..3e8e4372d66 100644
224-
--- a/src/mono/wasm/runtime/types/internal.ts
225-
+++ b/src/mono/wasm/runtime/types/internal.ts
224+
--- a/src/mono/browser/runtime/types/internal.ts
225+
+++ b/src/mono/browser/runtime/types/internal.ts
226226
@@ -69,6 +69,7 @@ export function coerceNull<T extends ManagedPointer | NativePointer>(ptr: T | nu
227227
assets?: AssetEntryInternal[],
228228
runtimeOptions?: string[], // array of runtime options as strings
@@ -232,8 +232,8 @@ index f2dba23fe73..3e8e4372d66 100644
232232
waitForDebugger?: number,
233233
appendElementOnExit?: boolean
234234
@@ -78,6 +79,10 @@ export type MonoConfigInternal = MonoConfig & {
235-
exitAfterSnapshot?: number
236-
loadAllSatelliteResources?: boolean
235+
236+
jsThreadBlockingMode?: JSThreadBlockingMode,
237237
};
238238
+
239239
+export type LogProfilerOptions = {

patches/0001-enable-idbfs.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Date: Thu, 15 Sep 2022 20:43:57 +0000
44
Subject: [PATCH] fix: Enable IDBFS by default
55

66
---
7-
src/mono/wasm/wasm.proj | 1 +
7+
src/mono/browser/browser.proj | 1 +
88
1 file changed, 1 insertion(+)
99

10-
diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj
10+
diff --git a/src/mono/browser/browser.proj b/src/mono/browser/browser.proj
1111
index cac849c5818..9326146aa4f 100644
12-
--- a/src/mono/wasm/wasm.proj
13-
+++ b/src/mono/wasm/wasm.proj
12+
--- a/src/mono/browser/browser.proj
13+
+++ b/src/mono/browser/browser.proj
1414
@@ -215,6 +215,7 @@
1515
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableSIMD)' == 'true'">$(CMakeConfigurationLinkFlags) -msimd128</CMakeConfigurationLinkFlags>
16-
<CMakeConfigurationLinkFlags Condition="'$(MonoWasmThreads)' == 'true'">$(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth</CMakeConfigurationLinkFlags>
16+
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableThreads)' == 'true'">$(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth</CMakeConfigurationLinkFlags>
1717
<CMakeConfigurationLinkFlags >$(CMakeConfigurationLinkFlags) --emit-symbol-map</CMakeConfigurationLinkFlags>
1818
+ <CMakeConfigurationLinkFlags>$(CMakeConfigurationLinkFlags) -lidbfs.js</CMakeConfigurationLinkFlags>
1919

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 37552a5b0b20fc1463980491d6c90163d6547a37 Mon Sep 17 00:00:00 2001
2+
From: Jerome Laban <[email protected]>
3+
Date: Tue, 30 Jul 2024 23:37:48 -0400
4+
Subject: [PATCH] chore: Add browser wasm packages
5+
6+
---
7+
.../AssetsComputingHelper.cs | 3 +++
8+
1 file changed, 3 insertions(+)
9+
10+
diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
11+
index b7bdbd752ed..54ba9935970 100644
12+
--- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
13+
+++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
14+
@@ -16,6 +16,9 @@ public class AssetsComputingHelper
15+
{
16+
"Microsoft.NETCore.App.Runtime.Mono.browser-wasm",
17+
"Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm",
18+
+
19+
+ "Uno.NETCore.App.Runtime.Mono.browser-wasm",
20+
+ "Uno.NETCore.App.Runtime.Mono.multithread.browser-wasm",
21+
};
22+
23+
private static readonly string[] dotnetJsSingleThreadNames = new[]
24+
--
25+
2.45.0.windows.1
26+

patches/0002-dbg-proxy-net5.patch

-64
This file was deleted.

0 commit comments

Comments
 (0)