Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.Collections.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.Drawing.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.IO.Pipelines.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.Linq.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.Memory.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.ObjectModel.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/System.Text.Json.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/dotnet.native.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-aot/wwwroot/_framework/dotnet.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/System.Drawing.wasm
Binary file not shown.
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/System.Linq.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/System.Memory.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/System.Text.Json.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/dotnet.native.wasm
Binary file not shown.
Binary file modified wasm/dotnet/build-interp/wwwroot/_framework/dotnet.wasm
Binary file not shown.
17 changes: 16 additions & 1 deletion wasm/dotnet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Finally `sudo dotnet workload install wasm-tools` (without sudo for a user
# installation of dotnet, e.g., with option B above).

rm -r ./build-interp ./build-aot build.log
rm -r src/dotnet/bin src/dotnet/obj ./build-interp ./build-aot build.log

touch build.log
BUILD_LOG="$(realpath build.log)"
Expand All @@ -27,10 +27,25 @@ printf '%s\n' 'import.meta.url ??= "";' | cat - ./src/dotnet/bin/Release/net9.0/
echo "Copying symbol maps..." | tee -a "$BUILD_LOG"
cp ./src/dotnet/obj/Release/net9.0/wasm/for-publish/dotnet.native.js.symbols ./build-interp/wwwroot/_framework/

# Net9 and Net10 use Emscripten version 3.1.56, which emits legacy EH, see https://github.com/WebKit/JetStream/pull/188
# FIXME: Update toolchain to Net11 once available, then remove this wasm-opt call.
for wasmFile in $(find "./build-interp" -type f -name "*.wasm");
do
wasm-opt "$wasmFile" --translate-to-exnref --enable-bulk-memory --enable-exception-handling --enable-simd --enable-reference-types --enable-multivalue -o "$wasmFile"
done


echo "Building aot..." | tee -a "$BUILD_LOG"
dotnet publish -o ./build-aot ./src/dotnet/dotnet.csproj -p:RunAOTCompilation=true

# Workaround for `jsc` CLI
printf '%s\n' 'import.meta.url ??= "";' | cat - ./build-aot/wwwroot/_framework/dotnet.js > temp.js && mv temp.js ./build-aot/wwwroot/_framework/dotnet.js
echo "Copying symbol maps..." | tee -a "$BUILD_LOG"
cp ./src/dotnet/obj/Release/net9.0/wasm/for-publish/dotnet.native.js.symbols ./build-aot/wwwroot/_framework/

# Net9 and Net10 use Emscripten version 3.1.56, which emits legacy EH, see https://github.com/WebKit/JetStream/pull/188
# FIXME: Update toolchain to Net11 once available, then remove this wasm-opt call.
for wasmFile in $(find "./build-aot" -type f -name "*.wasm");
do
wasm-opt "$wasmFile" --translate-to-exnref --enable-bulk-memory --enable-exception-handling --enable-simd --enable-reference-types --enable-multivalue -o "$wasmFile"
done
Loading