From 63ee70d15c328bb429d3705c4dfccf49f0749f9c Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 4 Sep 2024 08:37:30 -0400 Subject: [PATCH] chore: Restore HR support --- src/Uno.Wasm.Bootstrap/ShellTask.cs | 11 +- .../build/Uno.Wasm.Bootstrap.targets | 16 ++- .../support/Uno.Wasm.AotProfiler.deps.json | 118 ++++++++++++++++++ .../tools/support/Uno.Wasm.AotProfiler.dll | Bin 0 -> 6656 bytes .../Uno.Wasm.MetadataUpdater.deps.json | 109 ++++++++++++++++ .../support/Uno.Wasm.MetadataUpdater.dll | Bin 0 -> 21504 bytes .../ts/Uno/WebAssembly/Bootstrapper.ts | 3 +- src/Uno.Wasm.MetadataUpdater/Runtime.cs | 41 ++---- 8 files changed, 259 insertions(+), 39 deletions(-) create mode 100644 src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.deps.json create mode 100644 src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.dll create mode 100644 src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.deps.json create mode 100644 src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.dll diff --git a/src/Uno.Wasm.Bootstrap/ShellTask.cs b/src/Uno.Wasm.Bootstrap/ShellTask.cs index d9aebb0..79b9bb3 100644 --- a/src/Uno.Wasm.Bootstrap/ShellTask.cs +++ b/src/Uno.Wasm.Bootstrap/ShellTask.cs @@ -686,9 +686,16 @@ namespace Uno.Wasm.Bootstrap Log.LogMessage(MessageImportance.Low, $"Bitcode files features lookup filter: {string.Join(",", features)}"); - var list = BitcodeFilesSelector.Filter(new(EmscriptenVersion), features.ToArray(), bitcodeFiles); + if (Version.TryParse(EmscriptenVersion, out var emsdkVersion)) + { + var list = BitcodeFilesSelector.Filter(emsdkVersion, features.ToArray(), bitcodeFiles); - NativeFileReference = list.Select(i => new TaskItem(i)).ToArray(); + NativeFileReference = list.Select(i => new TaskItem(i)).ToArray(); + } + else + { + Log.LogMessage(MessageImportance.Low, $"EmscriptenVersion is not set, skipping native assets"); + } } private IEnumerable GetEmccExportedRuntimeMethods() diff --git a/src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets b/src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets index 480dd0f..ecc8513 100644 --- a/src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets +++ b/src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets @@ -32,11 +32,24 @@ BeforeTargets="ResolveRuntimePackAssets" Condition=" '$(WasmShellGenerateAOTProfile)' == 'true' "> - + + + + + + + + @@ -110,6 +123,7 @@ $(TMP)\emsdk-cache diff --git a/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.deps.json b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.deps.json new file mode 100644 index 0000000..1343e46 --- /dev/null +++ b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.deps.json @@ -0,0 +1,118 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v7.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v7.0": { + "Uno.Wasm.AotProfiler/1.0.0": { + "dependencies": { + "DotNet.ReproducibleBuilds": "1.1.1", + "System.Memory": "4.5.2" + }, + "runtime": { + "Uno.Wasm.AotProfiler.dll": {} + } + }, + "DotNet.ReproducibleBuilds/1.1.1": { + "dependencies": { + "Microsoft.SourceLink.AzureRepos.Git": "1.1.1", + "Microsoft.SourceLink.Bitbucket.Git": "1.1.1", + "Microsoft.SourceLink.GitHub": "1.1.1", + "Microsoft.SourceLink.GitLab": "1.1.1" + } + }, + "Microsoft.Build.Tasks.Git/1.1.1": {}, + "Microsoft.SourceLink.AzureRepos.Git/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Bitbucket.Git/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Common/1.1.1": {}, + "Microsoft.SourceLink.GitHub/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.GitLab/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "System.Memory/4.5.2": {} + } + }, + "libraries": { + "Uno.Wasm.AotProfiler/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "DotNet.ReproducibleBuilds/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==", + "path": "dotnet.reproduciblebuilds/1.1.1", + "hashPath": "dotnet.reproduciblebuilds.1.1.1.nupkg.sha512" + }, + "Microsoft.Build.Tasks.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==", + "path": "microsoft.build.tasks.git/1.1.1", + "hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.AzureRepos.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==", + "path": "microsoft.sourcelink.azurerepos.git/1.1.1", + "hashPath": "microsoft.sourcelink.azurerepos.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Bitbucket.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==", + "path": "microsoft.sourcelink.bitbucket.git/1.1.1", + "hashPath": "microsoft.sourcelink.bitbucket.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Common/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==", + "path": "microsoft.sourcelink.common/1.1.1", + "hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitHub/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "path": "microsoft.sourcelink.github/1.1.1", + "hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitLab/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==", + "path": "microsoft.sourcelink.gitlab/1.1.1", + "hashPath": "microsoft.sourcelink.gitlab.1.1.1.nupkg.sha512" + }, + "System.Memory/4.5.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-fvq1GNmUFwbKv+aLVYYdgu/+gc8Nu9oFujOxIjPrsf+meis9JBzTPDL6aP/eeGOz9yPj6rRLUbOjKMpsMEWpNg==", + "path": "system.memory/4.5.2", + "hashPath": "system.memory.4.5.2.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.dll b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.AotProfiler.dll new file mode 100644 index 0000000000000000000000000000000000000000..8514629c7901d5a2d3a7ecf8090ace0fa222f5a3 GIT binary patch literal 6656 zcmeHLeQX@X6@R;TaqNq2a?S@y_{b)K3X9!6A-~_e>}_a`yJ-&P(=o zx4U~zt}S4oAknH)5iL?xs!~LS)E1SrR0663%70X$f0VW=YKiDyE&q^8NEJnD=x^rs zK8y`S{jZ2Q@0&O8y?OKI&6{~M9>43`6d|H0zK=d4dJ#1*Ljry}SOB|o^UIy|Lfac# zUX+f#u_Zfa`ikp0MNcm&hHl$VpyZh1m2JhemCS^ul$<l4S`qQPU z^R?05p{>d)DM_>%l-4Tsa1Uw)-w-~|Q2^zt-JHPf7i9qubY3EK>S3XT>*2~oU9UKi z-c^YvI5I?(tSjM!u$&@l2l~%FMA;hcN@}HUx{z)~`_`s@YQWA0XlJeh08iK!+KrYd z3ehRm^F0GCVcQUp7JOa!n#vHYS3PDq5ahPfDSTYl27FCri0DXDQ=r#zzoKy4WLiPd zEksX3i6p2*PhsAZA$}#*rUVRZ*|k+ptR;%kuEQZBNA88n=&oK5m77>6m{534QYIb? zpvFm#$(OIa8jU+wQ38trRTn$jsiifsp3Bok+9ioKY^T_I>cI4*HOUqlM1M>-P6_ml zZMrP2zbwUCy5-&5yxkZ~Nxj|PcJ;S5L;A+`33Q4*o!AJN*aWbB7o4IUJtBoO=Kh=S zSCeXAvM;qC4fwTS~+S#8y&+;+?KSO&DO zp{?+~M=U3YHZQPMIx#J`ws9waDD@F$$I&hLcnETwFEg)UBWDX7{Y1^_P$_VtwGrOt zJ(6-)w1s{v;7!syk*lazII$poD7Vl#`AnpRE=nAl0>5A2PYO6GC=&udPh4g$au(Xo zOB}XIZ7W*nJ>vQ=%A??ZC(7YAiNhZQkI~oV3(*+87`*_QA4E9)KN6S!332=hIUVh! z`vg86c^{Nt(fjE2L*nvBK#$Qspn=cib`CH*%nQr?SJIsy_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de((dN&%fUM`8m)WnhU0h>vVa>`N zY0GlXj3Yiw7q^M5+%{&<^_3-wf6v~!` zq{9wvty|kP>Q>gIE#-J0$l7^KjE&Bf3FKFO@!^^xs#*_qaXk82+=b%1f9pAuPC%}@3`;_pIMRSFcJxmEv6}y0CgvP)e8$#G(dX<)=T}M zRqar48>y~f&5w#$F#|JFAg_q=EYyv$e9_{*<-V8)M4G`Hn$LS8l;gJ}KJVIE@K$vN z|CjkE5OY#^Z^|PA49vJWCiqN|py)yBSt9rG6>F^5Zg?bxxbBDjdtqM=Z3C1+d>ra{ zaVG_R5E2IPKD1J_AAK0=9H_m5o)i$d5@nx=mo&V?{ZoRJg_TmUqZUU_!ww!lUzE?K W2bAjnjE8Cm?&ornUrg$gJn&z-6sUOs literal 0 HcmV?d00001 diff --git a/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.deps.json b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.deps.json new file mode 100644 index 0000000..92b7a2d --- /dev/null +++ b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.deps.json @@ -0,0 +1,109 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v8.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v8.0": { + "Uno.Wasm.MetadataUpdater/1.0.0": { + "dependencies": { + "DotNet.ReproducibleBuilds": "1.1.1" + }, + "runtime": { + "Uno.Wasm.MetadataUpdater.dll": {} + } + }, + "DotNet.ReproducibleBuilds/1.1.1": { + "dependencies": { + "Microsoft.SourceLink.AzureRepos.Git": "1.1.1", + "Microsoft.SourceLink.Bitbucket.Git": "1.1.1", + "Microsoft.SourceLink.GitHub": "1.1.1", + "Microsoft.SourceLink.GitLab": "1.1.1" + } + }, + "Microsoft.Build.Tasks.Git/1.1.1": {}, + "Microsoft.SourceLink.AzureRepos.Git/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Bitbucket.Git/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Common/1.1.1": {}, + "Microsoft.SourceLink.GitHub/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.GitLab/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + } + } + }, + "libraries": { + "Uno.Wasm.MetadataUpdater/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "DotNet.ReproducibleBuilds/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==", + "path": "dotnet.reproduciblebuilds/1.1.1", + "hashPath": "dotnet.reproduciblebuilds.1.1.1.nupkg.sha512" + }, + "Microsoft.Build.Tasks.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==", + "path": "microsoft.build.tasks.git/1.1.1", + "hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.AzureRepos.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==", + "path": "microsoft.sourcelink.azurerepos.git/1.1.1", + "hashPath": "microsoft.sourcelink.azurerepos.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Bitbucket.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==", + "path": "microsoft.sourcelink.bitbucket.git/1.1.1", + "hashPath": "microsoft.sourcelink.bitbucket.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Common/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==", + "path": "microsoft.sourcelink.common/1.1.1", + "hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitHub/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "path": "microsoft.sourcelink.github/1.1.1", + "hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitLab/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==", + "path": "microsoft.sourcelink.gitlab/1.1.1", + "hashPath": "microsoft.sourcelink.gitlab.1.1.1.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.dll b/src/Uno.Wasm.Bootstrap/tools/support/Uno.Wasm.MetadataUpdater.dll new file mode 100644 index 0000000000000000000000000000000000000000..049030265dd97f46c1b51784dd6308cbe00be8ce GIT binary patch literal 21504 zcmeHvdw3jIk#BWRPxokMG}4T0Nq)uS_t=uhdi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ts/Uno/WebAssembly/Bootstrapper.ts index 3ec5e12..4e8a68f 100644 --- a/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts +++ b/src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts @@ -270,8 +270,7 @@ namespace Uno.WebAssembly.Bootstrap { try { this.attachDebuggerHotkey(); - console.error("UNO TODO HOT RELOAD IS DISABLED"); - //await this.setupHotReload(); + await this.setupHotReload(); if (this._hotReloadSupport) { await this._hotReloadSupport.initializeHotReload(); diff --git a/src/Uno.Wasm.MetadataUpdater/Runtime.cs b/src/Uno.Wasm.MetadataUpdater/Runtime.cs index 4ef0a22..245943f 100644 --- a/src/Uno.Wasm.MetadataUpdater/Runtime.cs +++ b/src/Uno.Wasm.MetadataUpdater/Runtime.cs @@ -1,50 +1,23 @@ using System; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Runtime.InteropServices.JavaScript; namespace WebAssembly { internal sealed class Runtime { - /// - /// Mono specific internal call. - /// - [MethodImpl(MethodImplOptions.InternalCall)] - private static extern string InvokeJS(string str, out int exceptional_result); - - // Disable inlining to avoid the interpreter to evaluate an internal call that may not be available - [MethodImpl(MethodImplOptions.NoInlining)] - private static string MonoInvokeJS(string str, out int exceptionResult) => InvokeJS(str, out exceptionResult); - - // Disable inlining to avoid the interpreter to evaluate an internal call that may not be available - [MethodImpl(MethodImplOptions.NoInlining)] - private static string NetCoreInvokeJS(string str, out int exceptionResult) - => Interop.Runtime.InvokeJS(str, out exceptionResult); - /// /// Invokes Javascript code in the hosting environment /// internal static string InvokeJS(string str) - { - var r = IsNetCore - ? NetCoreInvokeJS(str, out var exceptionResult) - : MonoInvokeJS(str, out exceptionResult); - - if (exceptionResult != 0) - { - Console.Error.WriteLine($"Error #{exceptionResult} \"{r}\" executing javascript: \"{str}\""); - } - return r; - } - - internal static bool IsNetCore { get; } = Type.GetType("System.Runtime.Loader.AssemblyLoadContext") != null; + => Interop.InvokeJS(str); } -} -internal sealed class Interop -{ - internal sealed class Runtime + internal static partial class Interop { - [MethodImplAttribute(MethodImplOptions.InternalCall)] - public static extern string InvokeJS(string str, out int exceptional_result); + [JSImport("globalThis.Uno.WebAssembly.Bootstrap.Bootstrapper.invokeJS")] + public static partial string InvokeJS(string value); } }