Skip to content

Use out-channel-redirect and add wasm_of_ocaml support#436

Open
hhugo wants to merge 11 commits intomirage:mainfrom
hhugo:use-out-channel-redirect
Open

Use out-channel-redirect and add wasm_of_ocaml support#436
hhugo wants to merge 11 commits intomirage:mainfrom
hhugo:use-out-channel-redirect

Conversation

@hhugo
Copy link
Copy Markdown
Contributor

@hhugo hhugo commented Mar 31, 2026

Summary

  • Replace custom C stubs and JS runtime for stdout/stderr redirection with the out-channel-redirect library
  • Add wasm_of_ocaml support (runtime stubs, test mode, CI)
  • Add alcotest-wasm virtual package (mirroring alcotest-js)
  • Bump dune lang to 3.17

Test plan

  • Native tests pass
  • JS tests pass
  • Wasm tests pass

🤖 Generated with Claude Code

hhugo added 5 commits March 31, 2026 15:46
Replace custom C stubs and JS runtime for dup/dup2-based redirection
with the out-channel-redirect library, which handles native, JS, and
wasm targets.
Install binaryen and wasm_of_ocaml-compiler in CI, then run @runtest-wasm
with WASM_OF_OCAML=true on OCaml >= 4.14.
@hhugo hhugo marked this pull request as draft March 31, 2026 14:17
@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Mar 31, 2026

Draft because https://github.com/hhugo/out-channel-redirect is not yet released

hhugo and others added 6 commits April 3, 2026 12:26
Virtual package pulling in wasm_of_ocaml-compiler alongside alcotest,
mirroring alcotest-js for JavaScript.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When matrix.opam-local-packages is unset, it evaluates to "" which
overrides setup-ocaml's default of *.opam, causing local packages
not to be pinned. This makes the solver unable to resolve
alcotest {= version} from alcotest-wasm.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hhugo hhugo force-pushed the use-out-channel-redirect branch from 4fdf616 to 957ae5c Compare April 3, 2026 10:26
@hhugo hhugo marked this pull request as ready for review April 3, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant