Module imports function '__wbindgen_describe' from '__wbindgen_placeholder__' that is not exported by the runtime.
This error implied that the wasm-bindgen crate was introduced into your project as an indirect dependency.
wasm-bindgen is only for Wasm runtime in browsers (to interact with the JS engine). This is not the case for the ICP.
You can verify it by:
$ cargo tree --target wasm32-unknown-unknown -i wasm-bindgen
wasm-bindgen v0.2.92
├── js-sys v0.3.69
│ └── wasm-bindgen-futures v0.4.42
│ └── alloy-transport v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ ├── alloy-contract v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ │ └── alloy v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ │ └── alloy-demo v0.1.0 (/Users/lwshang/Projects/lab/alloy-demo)
│ ├── alloy-provider v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ │ └── alloy-contract v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba) (*)
│ ├── alloy-rpc-client v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ │ └── alloy-provider v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba) (*)
│ └── alloy-transport-http v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba)
│ └── alloy-rpc-client v0.1.0 (https://github.com/alloy-rs/alloy#5fbf57ba) (*)
└── wasm-bindgen-futures v0.4.42 (*)
Turning off some features of the alloy crate might work.
This works:
alloy = { git = "https://github.com/alloy-rs/alloy", default-features = false, features = [ "rlp" ] }
But this doesn’t:
alloy = { git = "https://github.com/alloy-rs/alloy", default-features = false, features = [ "contract" ] }
The "contract" feature introduces the wasm-bindgen crate because of this line alloy/crates/transport/Cargo.toml at 35cbf35164f31d2de1b84b2a8a9986e5b9b1560f · alloy-rs/alloy · GitHub.
This is a problem in the alloy project. It assumes that wasm-bindgen can always be used for wasm32 target which is not the case.
Update
There is already a GitHub issue for this problem. It seems that the alloy team has a plan to fix it.