I have a very simple component I'm writing and I am getting an odd compilation error that I don't think has anything to do with my code. Any insights before I dig further:
cargo component build
Compiling messaging-wit-test v0.1.0 (/Users/taylor/Documents/code/wasifill-example/actor)
error[E0432]: unresolved import `super`
--> src/lib.rs:3:1
|
3 | cargo_component_bindings::generate!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Component` in the root
|
= note: this error originates in the macro `cargo_component_bindings::generate` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this enum instead
|
3 | std::path::Component as _GuestImpl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0432`.
error: could not compile `messaging-wit-test` (lib) due to previous error
what's the name of your implementation type?
by default, it expects Component
, if you're using a different name, you need to specify it via the implementor: Name
argument to the generate!
macro
Oh...that is an interesting gotcha
Yep, that solved it
Thanks for the pointer
Taylor Thomas has marked this topic as resolved.
Last updated: Nov 25 2024 at 19:03 UTC