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

how to build/run examples #1490

Closed
brennennen opened this issue Dec 28, 2020 · 2 comments
Closed

how to build/run examples #1490

brennennen opened this issue Dec 28, 2020 · 2 comments

Comments

@brennennen
Copy link

Howdy,

Sorry in advance if this is dumb or I missed documentation somewhere.

I can't get some of the examples to run. Most seem to run with cargo run --example {file_name} but some throw build errors. Specifically, any that use druid::im I can't seem to get working. The two I tried and that failed were tabs and widget_gallery,

This issue/comment on cargo seems to be related:
rust-lang/cargo#4663 (comment)

System:

  • Windows10 19042
  • rustc 1.48.0
  • cargo 1.48.0

Steps to reproduce:

  • git clone https://github.com/linebender/druid
  • cargo run --example tabs
    • Cargo suggests adding the --features argument to build with im. If I add this, I then get another error stating --features doesn't do anything.

Output:

PS D:\repositories\druid> cargo run --example tabs
error: target `tabs` in package `druid` requires the features: `im`
Consider enabling them by passing, e.g., `--features="im"`
PS D:\repositories\druid> cargo run --features="im" --example tabs
error: --features is not allowed in the root of a virtual workspace
note: while this was previously accepted, it didn't actually do anything
@cmyr
Copy link
Member

cmyr commented Dec 29, 2020

yea, to run features you need to be inside the druid directory; the root directory has multiple crates, and so when you use --features there it doesn't know who you're trying to pass features to.

@brennennen
Copy link
Author

that works, thanks!

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

2 participants