Skip to content

0.2.0

Choose a tag to compare

@rboudrouss rboudrouss released this 23 Oct 09:50
· 472 commits to main since this release

Tried on FFI-heavy packages (mirage-crypto, lwt, cryptokit, minisat,
ocaml-lua, stb_image, extunix, lz4, snappy, argon2, ocaml-expat, lmdb, glpk,
fftw3, secp256k1-internal, tsdl...); fixes for what broke.

  • wasm32: integer literals beyond 31 bits in the bytecode's DATA section
    are wrapped to 31 bits instead of aborting the program at startup (optint,
    hence checkseum and decompress, holds such literals in its 32-bit code).
  • Node: the standard streams are the process's, as bytes (binary output and
    input were decoded as UTF-8, NUL bytes dropped).
  • C++ stubs and libraries with exceptions (-fwasm-exceptions).
  • -pthread dropped from the flags of stubs (lwt): caml_state became a
    thread-local variable there.
  • wasm64: caml_ba_alloc_dims gets its dimensions as intnat (stubs
    passing ints corrupted the heap); libffi writes widened return values
    at their address (ctypes-foreign calls returning int read 0).
  • link shows the C functions whose calls wasm-ld turned into traps
    (signature mismatches between C files), it used to hide them.
  • dune -x: the tools of the host next to the toolchain's ocamlc
    (%{ocaml}...); pkg-config only shows the sysroot's libraries to the
    wasm context; C tests see the sysroot's headers and libraries; archives
    holding host objects (a vendored library built by make) are rebuilt from
    the native build's C files; a kept _build of another tool is left
    alone; a package that produced no archive is not marked as built.
  • Packages without dune: the C files behind the native build's archive.
  • link builds the libraries named by -lX in .cma files (custom-only
    libraries such as stb_image, C libraries bound with ctypes-foreign).
  • System recipes are also found from the -lX of a package's .cma files.
  • New recipes: liblz4, snappy, expat, fftw3, glpk, libargon2, liblmdb, sdl2;
    mirage-crypto (-ec, -rng), lwt, cryptokit, secp256k1-internal, lmdb.