cargo-component
cargo-component copied to clipboard
Make composing packages with dependencies easier?
I am just getting started with components, I and find it quite cumbersome to import other components. Let me try to illustrate my problem.
I am creating a component, depending on wasi-http
, as such:
package component:adhoc;
/// An example world for the component to target.
world my-component {
include wasi:http/proxy;
}
and I'm importing the http
component like that:
[package.metadata.component.target.dependencies]
"wasi:http" = { path = "../wasi-http/wit" }
Now the http component itself depends on other components:
wit
└── deps
├── cli
├── clocks
├── filesystem
├── io
├── random
└── sockets
I would expect that importing wasi:http
would recursively import its dependency, but I instead need to individually specify paths to all my dependency's dependencies.
Is that a current rough edge, or am I misusing cargo component
completely?