Skip to content
rusthacks.dev
Topic

CLI

Small, fast command-line programs: parsing arguments, reading config, failing politely and shipping a single binary.

Flat illustration for the post “Regex Performance in Rust and Avoiding Catastrophic Cases”, composed around cargo.
CLI

Regex Performance in Rust and Avoiding Catastrophic Cases

Rust's regex crate guarantees linear-time matching, so there is no catastrophic backtracking. The real costs are compiling in a loop, unanchored scans and capture groups. Learn what to cache and when to use regex-lite.

4 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.