[package] name = "bstr" version = "1.3.0" #:version authors = ["Andrew Gallant "] description = "A string type that is not required to be valid UTF-8." documentation = "https://docs.rs/bstr" homepage = "https://github.com/BurntSushi/bstr" repository = "https://github.com/BurntSushi/bstr" readme = "README.md" keywords = ["string", "str", "byte", "bytes", "text"] license = "MIT OR Apache-2.0" categories = ["text-processing", "encoding"] exclude = ["/.github"] edition = "2021" rust-version = "1.60" resolver = "2" [workspace] members = ["bench"] [lib] bench = false [features] default = ["std", "unicode"] std = ["alloc", "memchr/std", "serde?/std"] alloc = ["serde?/alloc"] unicode = ["dep:once_cell", "dep:regex-automata"] serde = ["dep:serde"] [dependencies] memchr = { version = "2.4.0", default-features = false } once_cell = { version = "1.14.0", optional = true } regex-automata = { version = "0.1.5", default-features = false, optional = true } serde = { version = "1.0.85", default-features = false, optional = true } [dev-dependencies] quickcheck = { version = "1", default-features = false } ucd-parse = "0.1.3" unicode-segmentation = "1.2.1" [package.metadata.docs.rs] # We want to document all features. all-features = true # Since this crate's feature setup is pretty complicated, it is worth opting # into a nightly unstable option to show the features that need to be enabled # for public API items. To do that, we set 'docsrs', and when that's enabled, # we enable the 'doc_auto_cfg' feature. # # To test this locally, run: # # RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features rustdoc-args = ["--cfg", "docsrs"] [profile.release] debug = true [[example]] name = "graphemes" required-features = ["std", "unicode"] [[example]] name = "lines" required-features = ["std"] [[example]] name = "uppercase" required-features = ["std", "unicode"] [[example]] name = "words" required-features = ["std", "unicode"]