Skip to content

0.4.3

Choose a tag to compare

@benoitc benoitc released this 22 Sep 07:49
· 151 commits to main since this release

Packaging and clock fixes. Nothing in your code changes, and there is nothing
new to set. If you install from hex.pm and use the command adapters, this is
the first version that works.

  • The hex package now ships priv/script_v1. The files list in
    wasm.app.src replaces the plugin's default and had left priv/ out, so
    0.4.1 and 0.4.2 on hex.pm have no boot.py or boot.js and
    wasm_python_command and wasm_javascript_command fail at start unless
    erlang_wasm comes from a git checkout. This release carries the files.
  • scripts/build-python-reactor.sh can be run again. A second run found
    python.wasm up to date, got make's "is up to date" line instead of the
    link command, and failed in sh. The link line now comes from
    scripts/python-link-line.sh, which asks make with -W Programs/python.o
    and refuses anything that is not the link command.
  • The WASI monotonic clock counts from node start. It handed the guest
    BEAM's own monotonic time, which is negative, and as a u64 that wrapped to
    about 1.8e19: time.monotonic() in the Python reactor raised
    OverflowError, and asyncio, perf_counter and timeouts went with it. It
    is now nanoseconds since the node started, never negative and never
    decreasing. Nothing to set.
  • A clock id that is not a clock here says so. clock_time_get and
    clock_res_get answered ENOTCAPABLE to every id but the two clocks,
    which told a guest asking for CPU time that the host had withheld it. The
    CPU time ids now answer ENOTSUP and an id outside the four the
    specification defines answers EINVAL. A clock that exists and was not
    granted still answers ENOTCAPABLE.
  • poll_oneoff honours an absolute deadline. A clock subscription with
    the ABSTIME flag set was dropped from the wait, so the call returned at
    once and clock_nanosleep(TIMER_ABSTIME) did not sleep. It now waits
    until that clock reads the deadline.