You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated cargo component and while trying to compile a component, I got the following error while running cargo component build -p template-barebones --target wasm32-unknown-unknown --release
...
Compiling wit-bindgen v0.7.0
Compiling ec-core v0.1.0 (/Users/jake/codebases/entropy/constraints/core)
Compiling template-barebones v0.1.0 (/Users/jake/codebases/entropy/constraints/examples/barebones)
Finished release [optimized] target(s) in 9.19s
Creating component /Users/jake/codebases/entropy/constraints/target/wasm32-unknown-unknown/release/template_barebones.wasm
error: module does not export a function named `cabi_realloc`
That said, the generated .wasm file still appears to be somewhat of a valid component, as executing wasm-tools component wit on it shows a wit (although with root for the package and world name, but that might be an unrelated issue).
With this error, the generated bytecode does not run in the wasmtime instance like it used to. Note, I'm not using WASI
I tried doing a bit of research into cabi_realloc (such as this issue) but haven't quite grasped what I did to cause this to start popping up.
Any thoughts on how to get cabi_realloc to generate? Possibly related, I'm using wit-bindgen v0.7.0, although I'm the process of updating it to v0.11.0 (I see lots of macro parameters have changed).
The text was updated successfully, but these errors were encountered:
Do you have a small repro project I could look at?
From the version of wit-bindgen in the output, it looks like things might still be out-of-date.
Hey Peter!
cargo component version was todays master build.
I can open a repo project tomorrow if you wouldn't mind taking a peek.
I was thinking that might be related, since it seems like wit-bindgen would generate and export that function. Let me see if I can update that as well.
@peterhuene it appears that it was my end withwit-bindgen. I've gotten into the habit of disabling features by default, and the "realloc" feature was disabled, which exports the cabi_realloc() function.
I recently updated cargo component and while trying to compile a component, I got the following error while running
cargo component build -p template-barebones --target wasm32-unknown-unknown --release
That said, the generated .wasm file still appears to be somewhat of a valid component, as executing
wasm-tools component wit
on it shows a wit (although withroot
for the package and world name, but that might be an unrelated issue).With this error, the generated bytecode does not run in the wasmtime instance like it used to. Note, I'm not using WASI
I tried doing a bit of research into
cabi_realloc
(such as this issue) but haven't quite grasped what I did to cause this to start popping up.Any thoughts on how to get
cabi_realloc
to generate? Possibly related, I'm usingwit-bindgen
v0.7.0, although I'm the process of updating it to v0.11.0 (I see lots of macro parameters have changed).The text was updated successfully, but these errors were encountered: