Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary target dependencies #259

Open
minghuaw opened this issue Mar 13, 2024 · 0 comments
Open

Secondary target dependencies #259

minghuaw opened this issue Mar 13, 2024 · 0 comments

Comments

@minghuaw
Copy link

Is it expected that the user need to add wit files of secondary dependencies into Cargo.toml?

For example, in this modified tutorial example (https://github.com/minghuaw/wasm-component-tutorial), package component:calculator imports component:add/add and component:sub/sub, and the corresponding wit files are included in the Cargo.toml file as follows

# calculator/Cargo.toml
[package.metadata.component.target.dependencies]
"component:add" = { path = "../add/wit/world.wit" }
"component:sub" = { path = "../sub/wit/world.wit" }

However, when importing component:calculator/calculate into package component:command, it would generate an error with

# command/Cargo.toml
[package.metadata.component.target.dependencies]
"component:calculator" = { path = "../calculator/wit/world.wit" }

but works fine if the above section is changed to

[package.metadata.component.target.dependencies]
"component:add" = { path = "../add/wit/world.wit" }
"component:sub" = { path = "../sub/wit/world.wit" }
"component:calculator" = { path = "../calculator/wit/world.wit" }
@minghuaw minghuaw changed the title Secondary dependencies Secondary target dependencies Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant