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

Cryptic error on a wat file with floats #630

Closed
gabriel-fallen opened this issue Nov 25, 2019 · 2 comments
Closed

Cryptic error on a wat file with floats #630

gabriel-fallen opened this issue Nov 25, 2019 · 2 comments

Comments

@gabriel-fallen
Copy link

Running wasmtime --invoke=test wasmtime_bug.wat produces puzzling error message:

Error: failed to process main module `wasmtime_bug.wat`

Caused by:
    0: failed to invoke `test`
    1: unsupported outgoing binding expr As(OutgoingBindingExpressionAs { ty: Scalar(UnrestrictedFloat), idx: 0 })

wasmtime_bug.wat contains this:

(module
  (func $test (result f32)
f32.const 42.0
f32.const 8.0
f32.const 10.0
f32.sub
f32.div
)
  (export "test" (func $test)))

wat2wasm seems to process this file fine. At least the error message might be more enlightening I think. :)

@alexcrichton
Copy link
Member

Thanks for the report! This is due to the wasmtime-interface-types crate not having support yet for the "unrestricted float" type, but that can actually be trivially fixed by adding a new case there. The interface types support is currently being overhauled, though, so it may be best to wait for the dust to settle a bit.

@alexcrichton
Copy link
Member

I'm going to close this in favor of #677 since I think it's unlikely we'll support the old webidl bindings spec for much longer.

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