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

Document how to conditionally enable features in dependencies #5139

Closed
aturon opened this issue Mar 7, 2018 · 3 comments
Closed

Document how to conditionally enable features in dependencies #5139

aturon opened this issue Mar 7, 2018 · 3 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation

Comments

@aturon
Copy link
Member

aturon commented Mar 7, 2018

The / syntax in the features section appears to be undocumented.

@aep
Copy link

aep commented Aug 29, 2018

for anyone else coming here googling:

[dependencies]
othercrate = "1.2.3"

[features]
myfeature = ["othercrate/otherfeature"]

@dwijnand
Copy link
Member

Is it? The [features] section in the manifest reference docs (link) has the example:

# Features can be used to reexport features of other packages. The `session`
# feature of package `awesome` will ensure that the `session` feature of the
# package `cookie` is also enabled.
session = ["cookie/session"]

(which has been there since the feature's inception in #712)

Optimistically closing that this was just missed (I think mdbook search wasn't around in March). If this still needs work we can reopen.

@hvenev
Copy link

hvenev commented Mar 28, 2019

How does this work if cookie is optional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation
Projects
None yet
Development

No branches or pull requests

4 participants