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
3c7b97f to
2692817
Compare
Dune 3.23 derives the >= 20180523 menhir constraint from (using menhir 3.0). Older dune versions don't, so they would regenerate the opam files without it. State the bound explicitly in each (depends ...) of dune-project so opam files stay stable across dune versions, and update the opam files accordingly.
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, the test runs `node %{test} wc.ml` but
wc.ml is only referenced positionally on the command line, not as a
dune dep, so it isn't copied into the sandbox. Adding it under
(deps ...) makes the rule sandbox-clean.
It uses `js_of_ocaml --build-config` to manage config details. Dune 3.23 sandboxes user rules by default; the necessary test adjustments are in the following commits.
Drop CI matrix entries, opam constraints, and conditional code for 4.13. Minimum supported version is now 4.14.
2692817 to
f88da80
Compare
Blocked by: