Cargo Features
[dependencies]
bstr = { version = "1.12.1", default-features = false, features = ["std", "alloc", "unicode", "serde"] }
- default = std, unicode
-
These default features are set whenever
bstris added withoutsomewhere in the dependency tree.default-features = false - std default = alloc
-
Enables std of memchr and optional serde
memchr:
The 'std' feature permits the memchr crate to use the standard library. This permits this crate to use runtime CPU feature detection to automatically accelerate searching via vector instructions. Without the standard library,
this automatic detection is not possible.Affects
ext_slice::ByteSlice.from_os_str,ext_slice::ByteSlice.from_path,ext_slice::ByteSlice.to_os_str,ext_slice::ByteSlice.to_os_str_lossy,ext_slice::ByteSlice.to_path,ext_slice::ByteSlice.to_path_lossy,ext_vec::ByteVec.from_os_string,ext_vec::ByteVec.from_os_str_lossy,ext_vec::ByteVec.from_path_buf,ext_vec::ByteVec.from_path_lossy,ext_vec::ByteVec.into_os_string,ext_vec::ByteVec.into_os_string_lossy,ext_vec::ByteVec.into_path_buf,ext_vec::ByteVec.into_path_buf_lossy,bstr::io… - alloc std
-
Enables alloc of memchr and optional serde
memchr:
The 'alloc' feature enables some APIs that require allocation, such as 'Finder::into_owned'. Note that this feature does not enable runtime CPU
feature detection. That still requires 'std'.Affects
ext_slice::ByteSlice.to_str_lossy,ext_slice::ByteSlice.to_str_lossy_into,ext_slice::ByteSlice.repeatn,ext_slice::ByteSlice.replace,ext_slice::ByteSlice.replacen,ext_slice::ByteSlice.replace_into,ext_slice::ByteSlice.replacen_into,ext_slice::ByteSlice.to_ascii_lowercase,ext_slice::ByteSlice.to_ascii_uppercase,ext_vec::ByteVec.unescape_bytes,ext_slice::ByteSlice.to_lowercase,ext_slice::ByteSlice.to_lowercase_into,ext_slice::ByteSlice.to_uppercase,ext_slice::ByteSlice.to_uppercase_into… - unicode default
-
Enables regex-automata
Affects
ext_slice::ByteSlice.fields,ext_slice::ByteSlice.graphemes,ext_slice::ByteSlice.grapheme_indices,ext_slice::ByteSlice.words,ext_slice::ByteSlice.word_indices,ext_slice::ByteSlice.words_with_breaks,ext_slice::ByteSlice.words_with_break_indices,ext_slice::ByteSlice.sentences,ext_slice::ByteSlice.sentence_indices,ext_slice::ByteSlice.trim,ext_slice::ByteSlice.trim_start,ext_slice::ByteSlice.trim_end,ext_slice::ByteSlice.reverse_graphemes,ext_slice::Fields,ext_slice::ByteSlice.to_lowercase,ext_slice::ByteSlice.to_lowercase_into… - serde
-
Enables serde