Hi, I was trying to run the Component Model Calculator example code (located at https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/tutorial) but was having some issues. I downloaded the tutorial folder directly and moved it into my workspace, and now when I try to do "cd calculator && cargo component build --release", I get the following error (upon the latter "cargo component build --release" command:
error[E0425]: cannot find function run_ctors_once
in crate wit_bindgen_rt
--> src/bindings.rs:184:25
|
184 | wit_bindgen_rt::run_ctors_once();
| ^^^^^^^^^^^^^^ not found in wit_bindgen_rt
For more information about this error, try rustc --explain E0425
.
error: could not compile calculator
(lib) due to 1 previous error
Is there perhaps some dependency or other I am missing due to having directly downloaded the folder, and I was also wondering how I might be able to proceed to be able to get the example calculator running, so I can then modify and start working with it? I did also just update cargo component before this, due to getting a different version error when running the command. Would appreciate any advice. Thanks!
What version of #cargo-component are you using, may I ask? Perhaps the tutorial needs to specify a version or update the bindings? AFAIK there should be a way via a lock file https://github.com/bytecodealliance/cargo-component/blob/main/example/Cargo-component.lock
you can try to delete all the bindings and run cargo component
that you have installed to regenerate them I think as well, to see if that works :fingers_crossed:
It could be that this dep and others need to be bumped as well FYI
@Aatash P looks like a bump and rebind is all that you should need https://github.com/bytecodealliance/component-docs/pull/134/
Nuke 🌄 said:
Aatash P looks like a bump and rebind is all that you should need https://github.com/bytecodealliance/component-docs/pull/134/
Just tried this out and applied that change to all the .toml files and it seems to have done the trick. Thank you so much!
Nuke 🌄 has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC