BurntSushi/bstr
A string type for Rust that is not required to be valid UTF-8. observed · 2026-08-28
Health v2 · maintenance only
76/100
- Activity 97
- Release rhythm 35
- Longevity 100
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2760
- days_rel: n/a
- days_push: 23
- n_releases_24m: 0
Adoption not part of the score
1110 stars · 76 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
bstr is a Rust crate providing a byte string type and extension traits for &[u8] and Vec<u8> that are not required to be valid UTF-8. It offers Unicode-aware operations like substring search, case conversion, grapheme iteration, and line-oriented I/O helpers that tolerate invalid UTF-8.
Use cases
- process byte data that may not be valid UTF-8 in Rust
- search for substrings in binary or mixed-encoding data
- iterate over lines of stdin without UTF-8 validation
- count Unicode words in byte streams
- convert byte text to uppercase while passing invalid UTF-8 through
- extract grapheme clusters from possibly-invalid UTF-8 text
When to choose
- you need string-like operations on bytes that may be partially or fully invalid UTF-8
- you want Unicode-aware substring search and grapheme handling on byte slices
- you are writing CLI tools or parsers that must handle arbitrary input bytes
When to avoid
- your data is guaranteed valid UTF-8 and std's str/String suffices
- you need a general-purpose binary serialization format rather than string handling
Facets
library · maturity stable
parser serialization developer-tools programming-languages developer-tools rust cross-platform byte-strings utf-8 unicode substring-search graphemes no-std-friendly natural-language-processing
2 sources
- readme: https://github.com/BurntSushi/bstr · fetched 2026-08-28 · 4af7f193c04b
- registry_crates: https://crates.io/api/v1/crates/bstr · fetched 2026-08-29 · fb2ac36e9ba2
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| BurntSushi/bstr | main | 76 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem