wasm-tools 1.255.0

CLI tools for interoperating with WebAssembly files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;; FAIL: parse % -o %tmpdir/strict.wasm
;; RUN[lenient]: WAST_STRICT_COMPONENT_INDICES=0 parse % -o %tmpdir/lenient.wasm

;; The legacy `(realloc (func ...))` syntax is rejected in strict mode; the
;; new spec requires `(realloc (core func ...))`.
(component
  (import "f" (func $f (param "x" string)))
  (core module $libc
    (memory (export "mem") 1)
    (func (export "realloc") (param i32 i32 i32 i32) (result i32) unreachable))
  (core instance $libc (instantiate $libc))
  (core func (canon lower (func $f)
    (memory 0)
    (realloc (func $libc "realloc"))))
)