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

Don't count wasm4 commands as WASI commands #96

Open
Michael-F-Bryan opened this issue Nov 21, 2022 · 1 comment
Open

Don't count wasm4 commands as WASI commands #96

Michael-F-Bryan opened this issue Nov 21, 2022 · 1 comment
Labels
category: bug Something isn't working good first issue Good for newcomers

Comments

@Michael-F-Bryan
Copy link
Contributor

It looks like we blindly assume all commands are WASI when inspecting a *.webc file.

You can reproduce this using the f0rodo/[email protected] package.

$ wasmer --version --verbose
wasmer 3.0.0 (3a105 2022-11-20)
binary: wasmer-cli
commit-hash: 3a105194470a955ba663509fc8dae60d3085717c
commit-date: 2022-11-20
host: x86_64-unknown-linux-gnu
compiler: singlepass,cranelift,llvm

$ wget https://registry-cdn.wapm.io/packages/f0rodo/rusty/rusty-1.0.0.webc

$ wasmer run wasmer/[email protected] --dir . -- show ./rusty-1.0.0.webc
Error: Unable to load the package

Caused by:
    no "atom" or "wasi.atom" or "emscripten.atom" found in command Command {
        runner: "https://webc.org/runner/wasm4/command@unstable_",
        annotations: {
            "wasm4": Map(
                {
                    Text(
                        "atom",
                    ): Text(
                        "rusty",
                    ),
                    Text(
                        "package",
                    ): Null,
                    Text(
                        "main_args",
                    ): Null,
                },
            ),
        },
    }

Ideally, the webc crate's get_atom_name_for_command() function would use the manifest to figure out the atom's ABI automatically, but in the meantime we should skip wasm4 commands when generating bindings.

@Michael-F-Bryan
Copy link
Contributor Author

@ayys originally mentioned this on November 21st on Slack.

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

No branches or pull requests

1 participant