From d2a2c9d9e07d2684acb17dd2f964a21b42863053 Mon Sep 17 00:00:00 2001 From: damacek Date: Fri, 12 Jan 2024 15:48:46 +0100 Subject: [PATCH] Ensure that 'perf' doesn't enable 'std' implicitly --- regex-automata/Cargo.toml | 2 +- regex-automata/src/lib.rs | 4 ++++ src/lib.rs | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/regex-automata/Cargo.toml b/regex-automata/Cargo.toml index 3cb3d7c8e..443891b53 100644 --- a/regex-automata/Cargo.toml +++ b/regex-automata/Cargo.toml @@ -44,7 +44,7 @@ perf = ["perf-inline", "perf-literal"] perf-inline = [] perf-literal = ["perf-literal-substring", "perf-literal-multisubstring"] perf-literal-substring = ["aho-corasick?/perf-literal", "dep:memchr"] -perf-literal-multisubstring = ["std", "dep:aho-corasick"] +perf-literal-multisubstring = ["dep:aho-corasick"] # Enables all Unicode features. This expands if new Unicode features are added. unicode = [ diff --git a/regex-automata/src/lib.rs b/regex-automata/src/lib.rs index 62260a5ae..7ca03278e 100644 --- a/regex-automata/src/lib.rs +++ b/regex-automata/src/lib.rs @@ -451,6 +451,10 @@ useful in trying to understand what the meta regex engine is doing. ### Performance features +**Note**: + To get performance benefits offered by the SIMD, `std` must be enabled. + None of the `perf-*` features will enable `std` implicitly. + * **perf** - Enables all of the below features. * **perf-inline** - When enabled, `inline(always)` is used in (many) strategic locations to help performance at the expense of longer compile times and diff --git a/src/lib.rs b/src/lib.rs index 6dbd3c202..2a26d735f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1183,6 +1183,10 @@ default are noted. ### Performance features +**Note**: + To get performance benefits offered by the SIMD, `std` must be enabled. + None of the `perf-*` features will enable `std` implicitly. + * **perf** - Enables all performance related features except for `perf-dfa-full`. This feature is enabled by default is intended to cover all reasonable features