Skip to content

Add support cfg_attr #23

@helgoboss

Description

@helgoboss

First: Extremely practical crate! Thanks!

I wanted to use Cargo features and cfg_attr in order to be able to activate/deactivate the compilation of metering or change which set of functions is going to be measured. However, I ran into the problem that cfg_attr complained about measure not being an attribute.

Example:

#[cfg_attr(feature = "measure-audio", measure)]
pub fn my_audio_function() {
    todo!()
}

Is there any way to fix it? E.g. to make measure an actual attribute?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions