-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
I found a few issues while setting up WASM benchmarks & would like to fix those. Since those would include breaking changes, I’m asking about them here before starting any work.
- Currently
--expose_wasmis the default parameter forjavaScriptEngineArguments, but the flag was removed in 2024. - The JS entry point is hardcoded to be
AppBundle/test-main.js(orAppBundle/main.jswith .net 5 / 6). The user then has to create the file under the correct path & still needs to set theWasmMainJSPathas an msbuild argument. The path shouldn’t be hardcoded & BenchmarkDotNet could autogenerate the file. - The default parameter for the .net monikers are still .net 5. IMHO, those should either be removed or replaced with factory methods (
CreateWasm10_0(string javaScriptEngine, string javaScriptEngineArguments, bool aot)).
The docs are also outdated (already tracked by #1818):
- The current example only describes how to set benchmarks up using a custom dotnet runtime. This is unnecessary and looks scary to anyone not working on dotnet itself.
- The example also recommends using v8 directly via
jsvu, which does not provide standard JavaScript APIs. Dotnet relies on these APIs (for creating GUID’s, it usescrypto.getRandomValues()for example). IMHO, recommending node might be the better choice.
Would you accept such a PR, or is someone already working on something similar?