Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: support for WASI preview 2 component model #2376

Open
HarikrishnanBalagopal opened this issue Jan 30, 2024 · 1 comment
Open

Comments

@HarikrishnanBalagopal
Copy link

HarikrishnanBalagopal commented Jan 30, 2024

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

@HarikrishnanBalagopal HarikrishnanBalagopal changed the title feature request: support for WASI 2 component model feature request: support for WASI preview 2 component model Jan 30, 2024
@sbc100
Copy link
Member

sbc100 commented Jan 30, 2024

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants