Conversation
28a41a0 to
7a4d3ff
Compare
c1fc50d to
c9f7566
Compare
85a9891 to
25a5e68
Compare
391b19a to
f3efbd6
Compare
31610af to
2356554
Compare
hhugo
reviewed
Mar 12, 2026
| with | ||
| | Some "native" -> `Native | ||
| | Some "cps" -> `Cps | ||
| | _ -> `Jspi); |
Member
There was a problem hiding this comment.
Waybe we should not silently ignore unknown values
Member
There was a problem hiding this comment.
There is similar diff in #2189, is there a lot of intersection between the two ?
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.
Wasmtime only supports these instructions. We should eventually use instead of the legacy instructions, but they are not allowed by default in node.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can produce a WASI binary by running
wasm_of_ocamlwith the--enable wasiflag:This produces some Wasm code that can be directly executed by the Wizard engine:
wasmtime does not support the legacy exception handling instructions. You can produce a binary that will work with wasmtime as well by adding the
--enable exnrefflag:You can then execute it with the following command:
Note that we keep the same output convention, at least for now: a JavaScript file
foo.jsand a directoryfoo.assetscontaining the Wasm code. The JavaScript file can be use to run the WASI binary withnode.Blocked by: