Repository navigation
Update WebAssembly compilation docs for Dart 3.14 - #7566
Conversation
|
Visit the preview URL for this PR (updated for commit 7a65834): |
There was a problem hiding this comment.
Code Review
This pull request updates the Dart WebAssembly (Wasm) compilation documentation across several files, including dart-compile.md, web/index.md, and web/wasm.md. The updates detail the companion .mjs JavaScript runtime, browser compatibility requirements, standalone WASI compilation, conditional imports, SIMD support, and provide a clearer step-by-step guide to compile and run a web app with Wasm. Feedback on the changes suggests avoiding the recommendation of dart pub global in the documentation, proposing instead to use dart run dhttpd after adding it to dev dependencies.
kevmoo
left a comment
There was a problem hiding this comment.
mustly nits - and one mistake on my part!
Updates the WebAssembly compilation documentation on
dart.devfor Dart 3.14.Fixes #7558.
Summary of changes
src/content/web/wasm.md(/web/wasm):dart2wasm(WasmGC, JS String Builtins (wasm:js-string), and Phase 4 Exception Handling (try_tableandexnref)) along with minimum browser versions (Chrome/Edge 137+, Safari 26.2+, and Firefox 134+ / 155+ recommended).--standalonefor non-web WASI runtimes (such as Wasmtime 39+ with-W gc,exceptions,function-references=y) and note thatdart:js_interopis disallowed when--standaloneis set.dart.library.isolateconditional-import behavior (falseindart2wasm, matchingdart2jsandddc) and native 128-bitv128SIMD support fordart:typed_dataSIMD types.dart help compile wasmCLI output with-O0..-O4,--[no-]minify,--[no-]strip-wasm,--[no-]enable-deferred-loading,--standalone, and--[no-]deprecated-js-interop.site/main.mjsruntime (compileStreaming+instantiate+invokeMain).src/content/tools/dart-compile.md(/tools/dart-compile#wasm):wasmsubcommand summary to mention the companion.mjsruntime and add adart compile wasmoptions table (-O<0|1|2|3|4>,--[no-]minify,--[no-]strip-wasm,--[no-]source-maps,--enable-deferred-loading,--standalone,--[no-]deprecated-js-interop,-D<key>=<value>).src/content/web/index.md(/web):dart compile wasm) in the opening paragraph alongside Dart-to-JavaScript compilers.