wabt
wabt copied to clipboard
feature request: support for WASI preview 2 component model
The example code doesn't compile with wat2wasm
https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#component-definitions
(component
(component
(core module (func (export "one") (result i32) (i32.const 1)))
(core module (func (export "two") (result f32) (f32.const 2)))
)
(core module (func (export "three") (result i64) (i64.const 3)))
(component
(component
(core module (func (export "four") (result f64) (f64.const 4)))
)
)
(component)
)
$ wat2wasm --version
1.0.34
$ wat2wasm main.wat
main.wat:1:2: error: unexpected token "component", expected a module field or a module.
(component
^^^^^^^^^
main.wat:2:3: error: unexpected token (, expected EOF.
(component
^
Other tools that support the component model https://component-model.bytecodealliance.org/language-support.html#building-a-component-with-wasm-tools
IIUC the component model is defined here: https://github.com/WebAssembly/component-model. And its completely separate/independent from WASI (WASI just happens to depend on it right?)