wasmerio / docs.wasmer.io

The Wasmer Docs Website (website deployed using Wasmer Edge)
https://docs.wasmer.io/
MIT License
14 stars 7 forks source link

Tutorial example doesn't work (doesn't publish) #83

Open HuakunShen opened 4 months ago

HuakunShen commented 4 months ago

I followed https://docs.wasmer.io/wasmer-pack/tutorial/01-hello-world#publishing-to-wapm

In the stage Publish To WAPM, cargo wapm --dry-run failed with the following error.

cargo wapm --dry-run

2024-05-01T07:54:06.901658Z  INFO publish: cargo_wapm::publish: Getting ready to publish dry_run=true pkg="hello-world"
Error: Unable to publish "hello-world"

Caused by:
    0: Unable to deserialize the [metadata] table
    1: expected one of "wit-bindgen" or "wai-version" to be provided, but not both
[package]
name = "hello-world"
version = "0.1.0"
edition = "2021"
description = "hello-world"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.wapm]
namespace = "huakunshen"
abi = "none"
bindings = { wai-bindgen = "0.1.0", exports = "src/hello-world.wai" }

[dependencies]
wai-bindgen-rust = "0.2.3"

[lib]
crate-type = ["cdylib", "rlib"]
HuakunShen commented 4 months ago

If I follow this tutorial https://docs.wasmer.io/registry/get-started. I could get a wasi package published, but wai-bindgen-rust doesn't work and I can't use the wasm package as a library.