Wasm native effects (Stack Switching proposal)#2189
Conversation
803534a to
b2a10e7
Compare
b2a10e7 to
6c31bb2
Compare
6c31bb2 to
89c34af
Compare
d8dd689 to
58ef063
Compare
58ef063 to
d215c0b
Compare
| @@ -1,8 +1,4 @@ | |||
| let extra_args_for_wasoo = | |||
| [ "--experimental-wasm-imported-strings" | |||
There was a problem hiding this comment.
Both flags have been removed in node 26 (the features are always enabled).
--experimental-wasm-imported-strings has been the default for quite some time.
--experimental-wasm-stack-switching (JSPI) is enabled by default since node 25.
There was a problem hiding this comment.
Could we maintain a list of flags per node and feature used ? Same thing for chrome ? It could live in the doc
There was a problem hiding this comment.
I'm not sure this belongs to the doc if these flags are only used for testing.
We have a fallback polyfill, so --experimental-wasm-imported-strings is never necessary.
Maybe I can document that JSPI is enabled by default since Chrome 137 and node 25?
There was a problem hiding this comment.
Maybe I can document that JSPI is enabled by default since Chrome 137 and node 25?
Yes.
--experimental-wasm-imported-strings has been the default for quite some time.
--experimental-wasm-stack-switching (JSPI) is enabled by default since node 25.
But the readme says
The generated code works with Chrome 119, Node.js 22, Firefox 122, and Safari 18.2 (or more recent versions of these applications).
I think we should try to be more precise maybe.
d215c0b to
fda7c88
Compare
5d49a99 to
3c7b97f
Compare
2692817 to
f88da80
Compare
194b88d to
3567945
Compare
Dune 3.23 forces sandboxing on user rules, so gen.exe runs from _build/.sandbox/<hash>/default/<dir> instead of the project tree. The previous prefix walker (stop when parent ends with _build) then yielded <hash>/default/<dir>/, which both shows up in the generated ;; comment and shifts the Hashtbl.hash-based name suffix, making the runtest diff against the checked-in dune.inc fail. Take the project-relative directory as argv.(1) (replacing the previously unused library-name argument) so the prefix is stable regardless of where dune runs the action.
The current release of ocaml-dune-lint is not compatible with dune 3.23.
Under dune 3.23 sandboxing, rules that run a *.bc.wasm.js file also need to depend on the companion *.bc.wasm.assets/ directory so that the .wasm files are copied into the sandbox.
Under dune 3.23 sandboxing, rules invoking js_of_ocaml or wasm_of_ocaml with --toplevel need their .cmi files brought into the sandbox. For locally built cmis, declare them as deps. For library cmis, add a cmi_include_dirs.txt rule (mirroring the existing one for toplevel.bc) that uses ocamlfind to produce -I flags, and pass the result via read-strings.
Under dune 3.23 sandboxing, wc.ml needs to be brought into the
sandbox. Inline the dep with %{dep:wc.ml} on the command line.
It uses `js_of_ocaml --build-config` to manage config details.
oxcaml-dune-patches pins dune <= 3.21, but the project requires dune >= 3.23. opam re-checks dependency constraints on every install, so a one-shot --ignore-constraints-on=dune flag isn't enough. Re-pin the package with the dune version constraint stripped, so subsequent installs let dune resolve to 3.23.x normally.
3567945 to
747e3b6
Compare
Blocked by: