wasmerio / cargo-wasmer

A cargo sub-command for publishing Rust crates to the WebAssembly Package Manager.
Apache License 2.0
23 stars 2 forks source link

Wai manifest error while publishing #4

Closed dynamite-bud closed 1 year ago

dynamite-bud commented 1 year ago

When I use cargo wapm --dry-run with the following:

[package.metadata.wapm]
namespace = "wasmer"
abi = "none"
bindings = { wai-version = "0.2.0", exports = "sha2.wai" }

I get the errrors:

Error: Could not parse manifest because missing field `wit-exports` for key `module.bindings` at line 14 column 1.
Error: Unable to publish "sha2-wasm"

Caused by:
    The wapm CLI exited unsuccessfully with exit code -1
Michael-F-Bryan commented 1 year ago

This is another poor error message we were running into:

$ cargo wapm --dry-run
Error: Unable to publish "hello-world"

Caused by:
    0: Unable to deserialize the [metadata] table
    1: data did not match any variant of untagged enum Bindings

With the following Cargo.toml:

[package.metadata.wapm]
namespace = "wasmer"  # Replace this with your WAPM username
abi = "none"
bindings = { wai-bindgen = "0.1.0", exports = "hello-world.wai" }

(note the wai-bindgen instead of wai-version)

Michael-F-Bryan commented 1 year ago

Fixed in #7 when we updated the wapm-toml dependency.