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

Use Cargo's "namespace features" feature #4293

Merged
merged 1 commit into from
Jun 21, 2022

Commits on Jun 21, 2022

  1. Use Cargo's "namespace features" feature

    Cargo recently added the ability to have an optional dependency without
    implicitly introducing a new named feature on a crate. This is triggered
    with some new directives in the `[features]` section, specifically:
    
    * The `dep:foo` syntax means that `foo` is activated but no implicit
      feature should be added named `foo`.
    
    * Additionally `foo?/bar` means that the `bar` feature of `foo` is only
      activated if `foo` is otherwise activated elsewhere, for example a
      conditional activation.
    
    These two features can help avoid extra feature names showing up that we
    don't want (e.g. currently the `wasmtime` crate has a `rayon` feature)
    and additionally can help avoid runtime dependencies in niche cases for
    us (e.g. activating `all-arch` but disabling `cranelift` would
    previously pull-in cranelift but no longer will).
    alexcrichton committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    166fbc5 View commit details
    Browse the repository at this point in the history