package wax-lib

  1. Overview
  2. Docs
Libraries for Wax, a Rust-like syntax for WebAssembly

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wax-v0.2.0.tbz
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b

doc/wax-lib.wasm/Wax_wasm/Declare_refs/index.html

Module Wax_wasm.Declare_refsSource

module_ m makes every function referenced by ref.func inside a function body declared as referenceable, so the module passes strict reference validation. Functions already "declared as referenceable" — named by a ref.func in an element / global / table initialiser, or exported (the same set Wax_wasm.Validation checks the rule against) — are left alone; the rest are added to an existing declarative element segment (extending it) or, if there is none, a fresh one appended to the module.

A module containing conditional ((@if ...)) fields is returned unchanged: a referenced function may be defined only under some configuration, so a single declarative segment cannot name it safely (and such a module cannot be emitted to the binary format anyway).