How do I 'pass down' feature flags to subdependencies in Cargo?

前端 未结 1 742
轻奢々
轻奢々 2020-11-27 22:36

I\'m writing a library in Cargo. If this library depends on another library like libc, which exposes a feature (in this case, use_std), how do I make a feature

相关标签:
1条回答
  • 2020-11-27 23:14

    From the documentation you linked to:

    # 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"]
    

    Is that sufficient?

    0 讨论(0)
提交回复
热议问题