Skip to content

Configure specific features to be used for all examples via Cargo.toml #12658

@softstream-link

Description

@softstream-link

Problem

Trying to add

this to my cargo.toml however

[profile.test]
default = ["unittest"]  // feature name
 
[profile.dev]
default = ["unittest"] // feature name

after adding above I am amble to run and compile tests which require "unittest" feature but not able to run anything under "examples" folder which depends on this feature until I add explicit add this

[[example]]
name = "file_name"
required-features = ["unittest"]

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)C-bugCategory: bugS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions