Skip to content

Commit ad542b2

Browse files
radekdouliklewingpavelsavara
authored
[wasm] emscripten bump 3.1.56 (#100334)
* [wasm] Bump emscripten to 3.1.56 * Replace Module.asm with Module.wasmExports Module.asm was removed, use wasmExports instead. Context: emscripten-core/emscripten#19816 * Updates for .native.worker.js -> mjs rename Context: emscripten-core/emscripten#21041 * Update deps * Add general testing feed * Update mode deps * Update path * Use current python packages for now, we don't have newer ones The current names 3.1.34 are new enough * Keep using llvm 16 for runtime and aot compiler * Add -Wno-pre-c11-compat only for browser * Temporarily disable version checks to get further * Temporarily disable version checks to get further #2 * Disable -Wunused-command-line-argument * Update emsdk deps * Update icu dependency * Revert "Temporarily disable version checks to get further #2" This reverts commit 3f8834f. * Revert "Temporarily disable version checks to get further" This reverts commit fe1e5c6. * Fix emsdk check We use system python on osx too * Workaround wasm-opt crash * Workaround wasm-opt crash * Workaround wasm-opt crash * Fix WBT test * Feedback * Update ICU dependency * Update emscripten deps * Revert "Workaround wasm-opt crash" This reverts commit 200cf3b. * Revert "Workaround wasm-opt crash" This reverts commit 4530edf. * Revert "Workaround wasm-opt crash" This reverts commit 3593c41. * Increase tests timeout * Show test progress * Increase MT library tests timeout * Disable WBT tests with SkiaSharp * Increase helix tests timeout on browser * Increase WBT timeout * Increase initial heap sizes * Fix mono_wasm_load_runtime cwrap signature Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)` * Enable XunitShowProgress for threading tasks tests * Try to reduce number of parallel AOT compilations To check whether it will improve memory issues on CI * Use new docker image for helix/windows tests * Revert "Try to reduce number of parallel AOT compilations" This reverts commit 5d9a6d2. * Reduce the timeouts * Reduce intitial heap size * use active issues for MT * Remove testing channel from nuget config, update deps * Update emsdk and icu dependencies --------- Co-authored-by: Larry Ewing <[email protected]> Co-authored-by: pavelsavara <[email protected]>
1 parent dcfd52b commit ad542b2

34 files changed

+72
-52
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Dependencies>
22
<ProductDependencies>
3-
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="9.0.0-preview.7.24358.1">
3+
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="9.0.0-preview.7.24365.2">
44
<Uri>https://github.com/dotnet/icu</Uri>
5-
<Sha>42787a07ecba682549f520293bb5a6941bdccb50</Sha>
5+
<Sha>c8db7547bc0a021ffd262b3449f5b0343894b32b</Sha>
66
</Dependency>
77
<Dependency Name="System.Net.MsQuic.Transport" Version="9.0.0-alpha.1.24167.3">
88
<Uri>https://github.com/dotnet/msquic</Uri>
@@ -68,14 +68,14 @@
6868
<Sha>7e4af02521473d89d6144b3da58fef253e498974</Sha>
6969
<SourceBuild RepoName="cecil" ManagedOnly="true" />
7070
</Dependency>
71-
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-preview.7.24352.2">
71+
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-preview.7.24365.1">
7272
<Uri>https://github.com/dotnet/emsdk</Uri>
73-
<Sha>d3583522209829d1ed0440662ba136c7b7700b16</Sha>
73+
<Sha>99ea0c06b84d3084d090da537080dd35d2a193cf</Sha>
7474
</Dependency>
7575
<!-- Intermediate is necessary for source build. -->
76-
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="9.0.0-preview.7.24352.2">
76+
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="9.0.0-preview.7.24365.1">
7777
<Uri>https://github.com/dotnet/emsdk</Uri>
78-
<Sha>d3583522209829d1ed0440662ba136c7b7700b16</Sha>
78+
<Sha>99ea0c06b84d3084d090da537080dd35d2a193cf</Sha>
7979
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
8080
</Dependency>
8181
<!-- Intermediate is necessary for source build. -->

eng/Versions.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
<!-- ILCompiler -->
217217
<MicrosoftDotNetILCompilerVersion>9.0.0-preview.7.24357.2</MicrosoftDotNetILCompilerVersion>
218218
<!-- ICU -->
219-
<MicrosoftNETCoreRuntimeICUTransportVersion>9.0.0-preview.7.24358.1</MicrosoftNETCoreRuntimeICUTransportVersion>
219+
<MicrosoftNETCoreRuntimeICUTransportVersion>9.0.0-preview.7.24365.2</MicrosoftNETCoreRuntimeICUTransportVersion>
220220
<!-- MsQuic -->
221221
<MicrosoftNativeQuicMsQuicSchannelVersion>2.3.5</MicrosoftNativeQuicMsQuicSchannelVersion>
222222
<SystemNetMsQuicTransportVersion>9.0.0-alpha.1.24167.3</SystemNetMsQuicTransportVersion>
@@ -239,7 +239,7 @@
239239
Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml
240240
like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-9_0_100_Transport
241241
-->
242-
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.7.24352.2</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
242+
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.7.24365.1</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
243243
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETRuntimeEmscriptenVersion>
244244
<MicrosoftNETRuntimeEmscripten3134Pythonwinx64Version>9.0.0-preview.7.24352.2</MicrosoftNETRuntimeEmscripten3134Pythonwinx64Version>
245245
<!-- workloads -->
@@ -262,6 +262,6 @@
262262
<runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>9.0.0-alpha.1.24175.1</runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion>
263263
<EmsdkPackageVersion>$(MicrosoftNETRuntimeEmscriptenVersion)</EmsdkPackageVersion>
264264
<NodePackageVersion>$(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)</NodePackageVersion>
265-
<EmsdkVersion>3.1.34</EmsdkVersion>
265+
<EmsdkVersion>3.1.56</EmsdkVersion>
266266
</PropertyGroup>
267267
</Project>

eng/liveBuilds.targets

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@
215215
$(LibrariesNativeArtifactsPath)segmentation-rules.json;"
216216
IsNative="true" />
217217
<!-- for threaded wasm -->
218-
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and Exists('$(LibrariesNativeArtifactsPath)dotnet.native.worker.js')"
218+
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and Exists('$(LibrariesNativeArtifactsPath)dotnet.native.worker.mjs')"
219219
Include="
220-
$(LibrariesNativeArtifactsPath)dotnet.native.worker.js"
220+
$(LibrariesNativeArtifactsPath)dotnet.native.worker.mjs"
221221
IsNative="true" />
222222
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser'"
223223
Include="

eng/pipelines/libraries/helix-queues-setup.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,6 @@ jobs:
177177

178178
# Browser WebAssembly windows
179179
- ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}:
180-
- (Windows.Amd64.Server2022.Open)[email protected]/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly
180+
- (Windows.Amd64.Server2022.Open)[email protected]/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly-20240702174122-7aba2af
181181

182182
${{ insert }}: ${{ parameters.jobParameters }}

src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
<PlatformManifestFileEntry Include="dotnet.runtime.js.map" IsNative="true" />
236236
<PlatformManifestFileEntry Include="dotnet.native.js" IsNative="true" />
237237
<PlatformManifestFileEntry Include="dotnet.globalization.js" IsNative="true" />
238-
<PlatformManifestFileEntry Include="dotnet.native.worker.js" IsNative="true" />
238+
<PlatformManifestFileEntry Include="dotnet.native.worker.mjs" IsNative="true" />
239239
<PlatformManifestFileEntry Include="dotnet.native.js.symbols" IsNative="true" />
240240
<PlatformManifestFileEntry Include="dotnet.d.ts" IsNative="true" />
241241
<PlatformManifestFileEntry Include="dotnet.native.wasm" IsNative="true" />

src/libraries/System.Runtime/tests/System.Buffers.Tests/System.Buffers.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
9+
<XunitShowProgress>true</XunitShowProgress>
910
<WasmXHarnessMaxParallelThreads>1</WasmXHarnessMaxParallelThreads>
1011
</PropertyGroup>
1112
<ItemGroup>

src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
</PropertyGroup>
77
<PropertyGroup Condition="'$(TargetOS)' == 'browser'">
88
<_WasmPThreadPoolUnusedSize>10</_WasmPThreadPoolUnusedSize>
9+
<XunitShowProgress>true</XunitShowProgress>
910
</PropertyGroup>
1011
<ItemGroup>
1112
<Compile Include="Helpers.cs" />

src/libraries/sendtohelixhelp.proj

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">06:00:00</_workItemTimeout>
4040
<_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetsAppleMobile)' == 'true'">01:15:00</_workItemTimeout>
4141
<_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetOS)' == 'android'">00:30:00</_workItemTimeout>
42+
<_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetOS)' == 'browser'">00:30:00</_workItemTimeout>
4243
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">00:45:00</_workItemTimeout>
4344
<_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">01:00:00</_workItemTimeout>
4445
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TestScope)' == 'outerloop' or '$(TestScope)' == 'all')">00:20:00</_workItemTimeout>

src/mono/browser/browser.proj

+7-4
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@
217217
</ItemGroup>
218218
<!-- for the jiterpreter -->
219219
<ItemGroup>
220+
<EmccExportedRuntimeMethod Include="wasmExports" />
221+
220222
<EmccExportedFunction Include="_fmod" />
221223
<EmccExportedFunction Include="_atan2" />
222224
<EmccExportedFunction Include="_fma" />
@@ -277,6 +279,7 @@
277279
<EmccStackSize>5MB</EmccStackSize>
278280
</PropertyGroup>
279281
<ItemGroup>
282+
<_EmccLinkFlags Include="-Wno-unused-command-line-argument" />
280283
<_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" />
281284
<_EmccLinkFlags Include="-s STACK_SIZE=$(EmccStackSize)" />
282285
<_EmccCommonFlags Condition="'$(WasmEnableThreads)' == 'true'" Include="-s USE_PTHREADS=1" />
@@ -294,7 +297,7 @@
294297
<_EmccLinkFlags Include="--source-map-base http://example.com" />
295298
<_EmccLinkFlags Include="-s WASM_BIGINT=1" />
296299
<_EmccLinkFlags Include="-s EXPORT_NAME=&quot;'createDotnetRuntime'&quot;" />
297-
<_EmccLinkFlags Include="-s MODULARIZE=1"/>
300+
<_EmccLinkFlags Include="-s MODULARIZE=1" />
298301

299302
<_EmccLinkFlags Include="-s ENVIRONMENT=&quot;web,webview,worker,node,shell&quot;" />
300303
<!-- remove -Wno-limited-postlink-optimizations once below issue is fixed
@@ -380,7 +383,7 @@
380383
<PInvokeTableFile>$(ArtifactsObjDir)wasm/pinvoke-table.h</PInvokeTableFile>
381384
<InterpToNativeTableFile>$(ArtifactsObjDir)wasm/wasm_m2n_invoke.g.h</InterpToNativeTableFile>
382385

383-
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Debug'">-g -Os -s -DDEBUG=1 -DENABLE_AOT_PROFILER=1 -DENABLE_BROWSER_PROFILER=1</CMakeConfigurationEmccFlags>
386+
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Debug'">-g -Os -DDEBUG=1 -DENABLE_AOT_PROFILER=1 -DENABLE_BROWSER_PROFILER=1</CMakeConfigurationEmccFlags>
384387
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Release'">-Oz -DENABLE_BROWSER_PROFILER=1</CMakeConfigurationEmccFlags>
385388

386389
<CMakeConfigurationLinkFlags Condition="'$(Configuration)' == 'Debug'" >$(CMakeConfigurationEmccFlags) -s ASSERTIONS=1 </CMakeConfigurationLinkFlags>
@@ -498,9 +501,9 @@
498501
DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
499502
SkipUnchangedFiles="true" />
500503

501-
<Copy SourceFiles="$(NativeBinDir)dotnet.native.worker.js"
504+
<Copy SourceFiles="$(NativeBinDir)dotnet.native.worker.mjs"
502505
DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
503-
Condition="Exists('$(NativeBinDir)dotnet.native.worker.js')"
506+
Condition="Exists('$(NativeBinDir)dotnet.native.worker.mjs')"
504507
SkipUnchangedFiles="true" />
505508

506509
<Copy SourceFiles="$(NativeBinDir)dotnet.native.js.symbols"

src/mono/browser/build/BrowserWasmApp.targets

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
<PropertyGroup>
7272
<_HasDotnetWasm Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.wasm'">true</_HasDotnetWasm>
73-
<_HasDotnetJsWorker Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.worker.js'">true</_HasDotnetJsWorker>
73+
<_HasDotnetJsWorker Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.worker.mjs'">true</_HasDotnetJsWorker>
7474
<_HasDotnetJsSymbols Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js.symbols'">true</_HasDotnetJsSymbols>
7575
<_HasDotnetNativeJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js'">true</_HasDotnetNativeJs>
7676
<_HasDotnetGlobalizationJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.globalization.js'">true</_HasDotnetGlobalizationJs>
@@ -85,7 +85,7 @@
8585
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.runtime.js" />
8686
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.wasm" Condition="'$(_HasDotnetWasm)' != 'true'" />
8787
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.js" Condition="'$(_HasDotnetNativeJs)' != 'true'" />
88-
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.worker.js" Condition="'$(_HasDotnetJsWorker)' != 'true' and Exists('$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.worker.js')" />
88+
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.worker.mjs" Condition="'$(_HasDotnetJsWorker)' != 'true' and Exists('$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.native.worker.mjs')" />
8989
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.globalization.js"
9090
Condition="'$(HybridGlobalization)' == 'true' and
9191
'$(_HasDotnetGlobalizationJs)' != 'true' and
@@ -550,7 +550,7 @@
550550
<ItemGroup>
551551
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.native.wasm" />
552552
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.native.js" />
553-
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.native.worker.js" Condition="Exists('$(_WasmIntermediateOutputPath)dotnet.native.worker.js')" />
553+
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.native.worker.mjs" Condition="Exists('$(_WasmIntermediateOutputPath)dotnet.native.worker.mjs')" />
554554
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.globalization.js" Condition="'$(HybridGlobalization)' == 'true' and Exists('$(_WasmIntermediateOutputPath)dotnet.globalization.js')" />
555555
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.native.js.symbols" Condition="'$(WasmEmitSymbolMap)' == 'true' and Exists('$(_WasmIntermediateOutputPath)dotnet.native.js.symbols')" />
556556
<_WasmAssembliesInternal Remove="$(_WasmDedupAssembly)"/>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.34
1+
3.1.56

src/mono/browser/runtime/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ set(ignoreMeEmsdkPath "${EMSDK_PATH}")
4545

4646
if(CMAKE_BUILD_TYPE STREQUAL "Release")
4747
add_custom_command(TARGET dotnet.native
48-
POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
48+
POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-simd --enable-bulk-memory ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
4949
COMMENT "Stripping debug symbols from dotnet.native.wasm using wasm-opt")
5050
endif()
5151

src/mono/browser/runtime/cwraps.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ function cwrap (name: string, returnType: string | null, argTypes: string[] | un
293293
// Only attempt to do fast calls if all the args and the return type are either number or void
294294
(fastCwrapTypes.indexOf(returnType) >= 0) &&
295295
(!argTypes || argTypes.every(atype => fastCwrapTypes.indexOf(atype) >= 0)) &&
296-
// Module["asm"] may not be defined yet if we are early enough in the startup process
296+
// Module["wasmExports"] may not be defined yet if we are early enough in the startup process
297297
// in that case, we need to rely on emscripten's lazy wrappers
298-
Module["asm"]
299-
? <Function>((<any>Module["asm"])[name])
298+
Module["wasmExports"]
299+
? <Function>((<any>Module["wasmExports"])[name])
300300
: undefined;
301301

302302
// If the argument count for the wasm function doesn't match the signature, fall back to cwrap
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
if (_nativeModuleLoaded) throw new Error("Native module already loaded");
22
_nativeModuleLoaded = true;
3-
createDotnetRuntime = Module = createDotnetRuntime(Module);
3+
createDotnetRuntime = Module = moduleArg(Module);

src/mono/browser/runtime/jiterpreter-jit-call.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function mono_interp_invoke_wasm_jit_call_trampoline (
187187
thunk(ret_sp, sp, ftndesc, thrown);
188188
} catch (exc: any) {
189189
receiveWorkerHeapViews();
190-
const exceptionTag = (<any>Module)["asm"]["__cpp_exception"];
190+
const exceptionTag = (<any>Module)["wasmExports"]["__cpp_exception"];
191191
const haveTag = exceptionTag instanceof (<any>WebAssembly).Tag;
192192
if (
193193
!haveTag || (

src/mono/browser/runtime/jiterpreter-support.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class WasmBuilder {
185185
}
186186

187187
getExceptionTag (): any {
188-
const exceptionTag = (<any>Module)["asm"]["__cpp_exception"];
188+
const exceptionTag = (<any>Module)["wasmExports"]["__cpp_exception"];
189189
if (typeof (exceptionTag) !== "undefined")
190190
mono_assert(exceptionTag instanceof (<any>WebAssembly).Tag, () => `expected __cpp_exception export from dotnet.wasm to be WebAssembly.Tag but was ${exceptionTag}`);
191191
return exceptionTag;
@@ -1832,7 +1832,7 @@ export function getMemberOffset (member: JiterpMember) {
18321832
}
18331833

18341834
export function getRawCwrap (name: string): Function {
1835-
const result = (<any>Module)["asm"][name];
1835+
const result = (<any>Module)["wasmExports"][name];
18361836
if (typeof (result) !== "function")
18371837
throw new Error(`raw cwrap ${name} not found`);
18381838
return result;

src/mono/browser/runtime/loader/assets.ts

+1
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ export function preloadWorkers () {
840840
const workerNumber = loaderHelpers.workerNextNumber++;
841841
const worker: Partial<PThreadWorker> = new Worker(jsModuleWorker.resolvedUrl!, {
842842
name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"),
843+
type: "module",
843844
});
844845
worker.info = {
845846
workerNumber,

src/mono/browser/runtime/pthreads/ui-thread.ts

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ function allocateUnusedWorker (): PThreadWorker {
291291
const workerNumber = loaderHelpers.workerNextNumber++;
292292
const worker = new Worker(uri, {
293293
name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"),
294+
type: "module",
294295
}) as PThreadWorker;
295296
getUnusedWorkerPool().push(worker);
296297
worker.loaded = false;

src/mono/browser/runtime/types/internal.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export declare interface EmscriptenModuleInternal {
449449
FS: any;
450450
wasmModule: WebAssembly.Instance | null;
451451
ready: Promise<unknown>;
452-
asm: any;
452+
wasmExports: any;
453453
getWasmTableEntry(index: number): any;
454454
removeRunDependency(id: string): void;
455455
addRunDependency(id: string): void;

src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public MiscTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildC
2222
[InlineData("Debug", false)]
2323
[InlineData("Release", true)]
2424
[InlineData("Release", false)]
25+
[ActiveIssue("https://github.com/dotnet/runtime/issues/103566")]
2526
public void NativeBuild_WithDeployOnBuild_UsedByVS(string config, bool nativeRelink)
2627
{
2728
string id = $"blz_deploy_on_build_{config}_{nativeRelink}_{GetRandomId()}";

src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ internal BuildPaths GetBuildPaths(BuildArgs buildArgs, bool forPublish = true)
607607
protected static string GetSkiaSharpReferenceItems()
608608
=> @"<PackageReference Include=""SkiaSharp"" Version=""2.88.6"" />
609609
<PackageReference Include=""SkiaSharp.NativeAssets.WebAssembly"" Version=""2.88.6"" />
610-
<NativeFileReference Include=""$(SkiaSharpStaticLibraryPath)\3.1.34\st\*.a"" />";
610+
<NativeFileReference Include=""$(SkiaSharpStaticLibraryPath)\3.1.56\st\*.a"" />";
611611

612612
protected static string s_mainReturns42 = @"
613613
public class TestClass {

src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ runtimeType is RuntimeVariant.SingleThreaded
170170
public string GetRuntimeNativeDir(string tfm = BuildTestBase.DefaultTargetFramework, RuntimeVariant runtimeType = RuntimeVariant.SingleThreaded)
171171
=> Path.Combine(GetRuntimePackDir(tfm, runtimeType), "runtimes", DefaultRuntimeIdentifier, "native");
172172
public bool IsMultiThreadingRuntimePackAvailableFor(string tfm)
173-
=> IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.worker.js"));
173+
=> IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.worker.mjs"));
174174

175175
public static string WasmOverridePacksTargetsPath = Path.Combine(TestDataPath, "WasmOverridePacks.targets");
176176

src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public void ProjectWithNativeReference(BuildArgs buildArgs, RunHost host, string
5151
[Theory]
5252
[BuildAndRun(aot: false)]
5353
[BuildAndRun(aot: true)]
54+
[ActiveIssue("https://github.com/dotnet/runtime/issues/103566")]
5455
public void ProjectUsingSkiaSharp(BuildArgs buildArgs, RunHost host, string id)
5556
{
5657
string projectName = $"AppUsingSkiaSharp";

0 commit comments

Comments
 (0)