Learn the golden path
Follow the tutorial to register files, finalize a map, and extract the exact bytes of a span in about ten minutes.

Sourcier is built for diagnostics-heavy tools — compilers, linters, formatters,
language servers and code editors — that need positions which are cheap to
build, compare, store and serialize, yet still resolve back to the exact bytes
of the file they point at. Instead of dragging String paths and four usize
fields through every diagnostic, you pack the whole span into one u64 and
keep the heavy data in a single immutable registry.
Learn the golden path
Follow the tutorial to register files, finalize a map, and extract the exact bytes of a span in about ten minutes.
Solve a specific task
Task-oriented guides cover installation, registration, packed positions, byte views, shared statistics, errors and performance tuning.
Look something up
Reference pages document the full API surface, the stable u64 bit
layouts, feature flags and every error variant.
Understand the design
Explanation pages walk through the two-phase lifecycle, the verified path index and the safety guarantees that shape the API.
u64 per span. File id, start line, start column, end line and end
column are bit-packed together. Positions are Copy, cache-friendly, order
naturally as integers and survive serialization round trips bit-exactly.view feature, a position resolves
to the exact bytes it covers, including multi-line spans and line terminators.#![forbid(unsafe_code)], error
enums are #[non_exhaustive], and the FileId trait is sealed.