Uh oh!
There was an error while loading. Please reload this page.
improve wasm support - #3020
Conversation
timcassell
commented
Feb 23, 2026
Looking at the code, |
FreyLuis
commented
Feb 23, 2026
It is used right here which then sets the I have a ci run without the last commit on main, that worked. It seems like the switch to the |
Uh oh!
There was an error while loading. Please reload this page.
timcassell
commented
Feb 23, 2026
Oh, duh, not sure how I missed that. What a mess, that could use some cleanup, too. So the test was never actually testing aot. |
timcassell
commented
Feb 23, 2026
Maybe the wwwroot is necessary? I also have a green CI run where I had it running on node, with minimal other changes to the toolchain (besides the async refactor and mjs changes for websocket). |
FreyLuis
commented
Feb 23, 2026
I don't know why the build doesn't fail in the ci, it crashes on my windows machine with the following errors: It does work with a minimal project (including main.js path). I'll see if i can fix this tomorrow. |
… from PATH - resolve js runtime from path - add option to specify wasm main.js template - add custom js runtime argument formatter option
@timcassell It works now. The IntigrationTests still fail while building the dllgatherer on windows on my pc, but i couldn't reproduce it on another machine or with another project. Like I wrote in the description, this does remove the I've noticed an odd behavior that I did not want to touch: When I set KeepBenchmarkFiles to true and build the project twice, it references all dlls from the previous build. I'm not sure if BenchmarkDotNet should delete the dlls before reusing the folder or build in another folder instead. |
timcassell
commented
Feb 24, 2026
What's the error?
|
FreyLuis
commented
Feb 24, 2026
Looks like the error happened while building BenchmarkDotNet.Autogenerated. The dllgatherer only crashed because I didn't build the project before running the IntigrationTests. All those files do exist. BenchmarkDotNet.IntegrationTests-1-build-no-restore-no-deps.binlog.zip |
timcassell
commented
Feb 25, 2026
Looks like there's a merge conflict. |
FreyLuis
commented
Feb 25, 2026
Should be fixed now. https://github.com/twobrainsgmbh/BenchmarkDotNet/actions/runs/22404078490 |
Uh oh!
There was an error while loading. Please reload this page.
| <WasmTargetsPath>$([System.IO.Path]::ChangeExtension('$(OriginalCSProjPath)', '.Wasm.targets'))</WasmTargetsPath> | ||
| <WasmDataDir>$WASMDATADIR$</WasmDataDir> | ||
| <WasmDataDir Condition="'$(WasmDataDir)' != ''">$([MSBuild]::NormalizeDirectory($(WasmDataDir)))</WasmDataDir> | ||
| <WasmMainJSPath>$MAINJS$</WasmMainJSPath> |
There was a problem hiding this comment.
@ilonatommy You recently changed away from this property, what are your thoughts here?
There was a problem hiding this comment.
Looks good, it should work for publish.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
timcassell
commented
Feb 27, 2026
pavelsavara
left a comment
There was a problem hiding this comment.
LGTM, but wait for Ilona's review
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Tim Cassell <cassell.timothy@gmail.com>
Co-authored-by: Tim Cassell <cassell.timothy@gmail.com>
| <WasmTargetsPath>$([System.IO.Path]::ChangeExtension('$(OriginalCSProjPath)', '.Wasm.targets'))</WasmTargetsPath> | ||
| <WasmDataDir>$WASMDATADIR$</WasmDataDir> | ||
| <WasmDataDir Condition="'$(WasmDataDir)' != ''">$([MSBuild]::NormalizeDirectory($(WasmDataDir)))</WasmDataDir> | ||
| <WasmMainJSPath>$MAINJS$</WasmMainJSPath> |
There was a problem hiding this comment.
Looks good, it should work for publish.
| => HashCode.Combine(base.GetHashCode(), JavaScriptEngine, JavaScriptEngineArguments, Aot, RuntimeFlavor); | ||
| => HashCode.Combine(base.GetHashCode(), JavaScriptEngine, JavaScriptEngineArguments, JavaScriptEngineArgumentFormatter, IsAOT, RuntimeFlavor, ProcessTimeoutMinutes); | ||
| private static string DefaultArgumentFormatter(WasmRuntime runtime, ArtifactsPaths artifactsPaths, string args) |
There was a problem hiding this comment.
Will it be coupled with a PR in perf repo? This formatter introduces double --module for v8 currently.
There was a problem hiding this comment.
Yes, I've prepared a branch that removes --module as an argument.
This PR aims to improve WASM support (as described in #2890) in a few ways:
JavaScriptEnginenow resolves executables from the PATH.mainJsTemplatePathoption allows customizing the startup script (with polyfill, for example).--wasmDataDiroption, that was used by dotnet/performance to setWasmMainJSPath.--expose_wasmas default args forjavaScriptEngineArguments.AOT currently fails because the unit tests set only MonoAotCompilerMode and not the WasmRuntimes aot option. I've fixed the test and disabled it for now.