Expand description
sorug — a blazingly fast, zero-allocation-preferred, WHATWG-compliant URL parser.
§Design
- Index-based record: component boundaries live as
u32offsets into the WHATWGhrefserialization, keeping the struct small and cache-friendly. - Lazy / CoW serialization: when the input is already canonical ASCII,
Urlborrows it with zero heap allocations; the first required mutation upgrades to an owned buffer. Cowon demand: percent-decoding helpers allocate only when needed.- SIMD delimiter scans:
memchron hot path segments. - Strict WHATWG state machine: transitions follow the URL Living Standard.
Structs§
- Url
- A parsed URL record backed by its WHATWG serialization (
href). - UrlFlags
- Compact boolean attributes of a parsed URL record.
Enums§
- Backing
- Storage for the WHATWG
hrefserialization. - Parse
Error - Failure modes of
Url::parse/ the basic URL parser. - State
- States of the WHATWG basic URL parser state machine.