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

Wasmer can't run non-wasi files (master) #2282

Closed
syrusakbary opened this issue May 1, 2021 · 2 comments · Fixed by #2290
Closed

Wasmer can't run non-wasi files (master) #2282

syrusakbary opened this issue May 1, 2021 · 2 comments · Fixed by #2290
Labels
bug Something isn't working

Comments

@syrusakbary
Copy link
Member

Describe the bug

I think due to latest changes in WASI. detection wasmer is no longer able to run simple files:

➜ ./target/release/wasmer tests/examples/fac.wat
error: failed to run `tests/examples/fac.wat`
│   1: WASI execution failed
╰─> 2: The WASI version could not be determined
@syrusakbary syrusakbary added the bug Something isn't working label May 1, 2021
@syrusakbary syrusakbary changed the title Wasmer can't run non-wasi files Wasmer can't run non-wasi files (master) May 1, 2021
@MarkMcCaskey
Copy link
Contributor

MarkMcCaskey commented May 4, 2021

Good catch, we should definitely have an integration test for this (since we clearly don't right now)

@MarkMcCaskey
Copy link
Contributor

MarkMcCaskey commented May 4, 2021

Oh! This edge case is far more subtle, the bug is specifically WASI ABIs that don't have any WASI imports, we fail to detect anything so say that it "isn't WASI", I suppose we should default to the latest ABI in that case

Type: wat
Size: 523 B
Imports:
  Functions:
  Memories:
  Tables:
  Globals:
Exports:
  Functions:
    "_start": [] -> [I32]
  Memories:
  Tables:
  Globals:

This is the heuristic of exported functions specifying which ABI breaking down. I'm rather surprised that this worked with the old logic to be honest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants