Stream: cargo-component

Topic: cargo_component_bindings puts bindings.rs in wrong folder


view this post on Zulip Christoph Brewing (Sep 18 2024 at 08:16):

Everything was fine until I recently upgraded cargo-component-bindings to "0.6.0. Now, I get an error message saying

error: bindings file `/target/bindings/myproject/bindings.rs` does not exist

The file bindings.rs is generated, indeed, but it is placed to myproject/src.

The macro cargo_component_bindings::generate!(); does it allow to name a target folder?

view this post on Zulip Christoph Brewing (Sep 18 2024 at 10:53):

Update:

My CI toolchain does not have a problem to build the same project.
It installs cargo install cargo-component@0.5.0 prior to the build where I have cargo-component v0.16.0 locally.

It seems that at a certain point, the output directory which seems to be determined by cargo-component changed. What I still do not understand is why the system still searches bindings.rs under the original path.


Last updated: Nov 25 2024 at 19:03 UTC