I'm not sure what's causing this, and I have noticed that this happens with other unrelated crates as well where it will not be able to find a macro-related crate even though that crate does show up in the build log. I've also tried adding said crate as a dependency in my Cargo.toml, but still no dice.
Is there something I don't know about cargo that is causing this? I'm also using NixOS, could the non-standard filesystem hierarchy be causing some issues? I'd love to solve this problem on my own but I really don't know where to begin. Any and all guidance would be appreciated
EDIT: Below is the output of cargo build -p wasmtime
on my machine:
Compiling wasmtime v30.0.2
error[E0463]: can't find crate for `wasmtime_component_macro`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/mod.rs:408:9
|
408 | pub use wasmtime_component_macro::bindgen;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `wasmtime_component_macro`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/mod.rs:550:9
|
550 | pub use wasmtime_component_macro::ComponentType;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `wasmtime_component_macro`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/mod.rs:578:9
|
578 | pub use wasmtime_component_macro::Lift;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `wasmtime_component_macro`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/mod.rs:606:9
|
606 | pub use wasmtime_component_macro::Lower;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `wasmtime_component_macro`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/mod.rs:665:9
|
665 | pub use wasmtime_component_macro::flags;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0432]: unresolved imports `crate::component::ComponentType`, `crate::component::Lift`, `crate::component::Lower`, `crate::component::Lift`, `crate::component::Lower`, `crate::component::Lift`, `crate::component::Lower`, `crate::component::ComponentType`, `crate::component::Lift`, `crate::component::Lower`
--> /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/func/host.rs:4:44
|
4 | use crate::component::{ComponentNamedList, ComponentType, Lift, Lower, Val};
| ^^^^^^^^^^^^^ ^^^^ ^^^^^
|
::: /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/instance.rs:4:64
|
4 | Component, ComponentExportIndex, ComponentNamedList, Func, Lift, Lower, ResourceType, TypedFunc,
| ^^^^ ^^^^^
|
::: /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/linker.rs:6:59
|
6 | Component, ComponentNamedList, Instance, InstancePre, Lift, Lower, ResourceType, Val,
| ^^^^ ^^^^^
|
::: /home/bailor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-30.0.2/src/runtime/component/resources.rs:3:24
|
3 | use crate::component::{ComponentType, Lift, Lower};
| ^^^^^^^^^^^^^ ^^^^ ^^^^^
Some errors have detailed explanations: E0432, E0463.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `wasmtime` (lib) due to 6 previous errors