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

cargo: Ensure 'perf' doesn't enable 'std' implicitly #1150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Palkovsky
Copy link

Enabling perf-literal in the regex implicitly enables std (through perf-literal-multisubstring in the regex-automata). Effectively, it is impossible to use enable perf for no-std targets.

Quoting @BurntSushi:

I think one could make the argument that features like perf-literal-multisubstring are generally orthogonal to whether a dependency on std should be introduced. Indeed, that feature does enable optimizations other than SIMD. So it seems perfectly cromulent to me that one might want to enable it without dependency on std.

So I think here is what I propose:

  • Remove the std feature from perf-literal-multisubstring.
  • Add a new section to the crate features docs prominently calling out that some of the SIMD optimizations require a dependency on std. And that most features, including perf-* features, will not also implicitly add a dependency on std. Instead, it is expected that users configuring the features for the crate will do that.

Fixes #1147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant