Skip to content

erlang_wasm 0.4.0

Choose a tag to compare

@benoitc benoitc released this 19 Sep 21:40
· 201 commits to main since this release

0.4.0

The workers ship with the application. Running JavaScript, Python or Lua
now needs the dependency and a runtime artifact, and nothing copied from
examples/. Nothing breaks: the new modules take names no 0.3 example used,
so code you copied keeps working. Upgrading from 0.3
maps each copied module to its installed one.

  • wasm_script_worker is the worker kernel; run/3 takes a source and a
    context. wasm_worker_adapter is the behaviour an adapter implements.
  • The adapters are wasm_javascript, wasm_javascript_command,
    wasm_python, wasm_python_command and wasm_lua.
  • wasm_instance_worker is the 0.3 examples/wasm_worker.erl, with the same
    calls.
  • The application starts the reaper. Set scratch_roots so a restarted node
    cleans up what a crashed one left, and reaper_options for the cleanup
    limits. wasm_script_worker:cleanup_stats/0 and cleanup_requests/0 show
    what it holds.
  • The guides open with what you want to do, and ten example pages run as
    written. Every code block in README.md, docs/ and the module docs is
    checked on every test run, and getting-started.md runs as pasted.