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

Publish to the registry directly #17

Open Michael-F-Bryan opened 1 year ago

Michael-F-Bryan commented 1 year ago

Publishing Rust crates with the wapm command no longer works because you run into validation errors around bulk memory operations.

$ cargo wapm --dry-run
2023-07-19T02:43:40.113941Z  INFO publish: cargo_wapm::publish: Getting ready to publish dry_run=true pkg="wapm-to-webc"
Error: WASM file "/Users/work/Documents/wasmer/pirita/target/wapm/wapm2pirita.wasm" detected as invalid because bulk memory support is not enabled (at offset 4615795)
            ╭─────────────────────────────────────────────────────────────────────────────╮
            │                                                                             │
            │       There's a new version of wasmer and wapm! 4.0.0-beta.1 → v3.3.0       │
            │      Changelog: https://github.com/wasmerio/wasmer/releases/tag/v3.3.0      │
            │                       Update with wasmer self-update                        │
            │                                                                             │
            ╰─────────────────────────────────────────────────────────────────────────────╯
Error: Unable to publish "wapm-to-webc"

Caused by:
    The wapm CLI exited unsuccessfully with exit code 255

The wapm command has also been removed from the Wasmer toolchain and its functionality was merged into the main wasmer CLI. As part of this migration, we also renamed wapm.toml to wasmer.toml.

To avoid more breaking changes in the future, we should publish to the Wasmer registry directly. This will involve: