# Sourcier > Compact and efficient source file mapping and position tracking for Rust: register files once, pack every span into a single u64. Source: https://github.com/elcoosp/sourcier ## Tutorials - [Your first source map](https://sourcier.vercel.app/tutorials/getting-started.md): Register source files, assign stable ids, pack a span into a single u64 and extract the exact bytes it covers. ## How-to Guides - [Handling errors](https://sourcier.vercel.app/guides/handling-errors.md): Distinguish every MapError and PositionError variant, match them exhaustively despite non_exhaustive, and recover with the right fallback. - [Installation](https://sourcier.vercel.app/guides/installation.md): Add Sourcier to a Rust project from crates.io or Git, verify the MSRV and trim feature flags for a leaner build. - [Registering source files](https://sourcier.vercel.app/guides/registering-files.md): Register single files, loops, all-or-nothing batches and OS paths; control capacity and resolve duplicate registrations. - [Sharing usage statistics](https://sourcier.vercel.app/guides/usage-statistics.md): Observe finalization activity across maps and threads with the lock-free RuntimeFeedback context. - [Tuning performance](https://sourcier.vercel.app/guides/tuning-performance.md): Pre-reserve capacity, choose the right id type, opt into parallel index construction and trim features for faster builds and leaner binaries. - [Views and navigation](https://sourcier.vercel.app/guides/navigating-source.md): Extract the exact bytes of a span, bridge byte offsets and packed positions, and render path:line:column diagnostics without allocating. - [Working with positions](https://sourcier.vercel.app/guides/working-with-positions.md): Create packed spans with checked and unchecked constructors, convert between absolute and relative forms, and order or serialize them. ## Reference - [API surface](https://sourcier.vercel.app/reference/api.md): Complete reference for every public type, trait and function Sourcier exports, with signatures, parameters and return values. - [Changelog](https://sourcier.vercel.app/reference/changelog.md): Release history of Sourcier, currently version 2.0 with the builder, offset bridge and verified path index. - [Errors](https://sourcier.vercel.app/reference/errors.md): Every MapError and PositionError variant with fields, display strings and the conditions that produce them. - [Feature flags](https://sourcier.vercel.app/reference/feature-flags.md): What the serde, view, rt-feedback and parallel Cargo features gate, their defaults and how to trim them. - [Position encoding](https://sourcier.vercel.app/reference/position-encoding.md): Stable u64 bit layouts for AbsolutePosition and RelativePosition, the reserved zero encoding, and wire-format compatibility rules. ## Explanation - [Performance design](https://sourcier.vercel.app/explanation/performance-design.md): The data structures behind the benchmarks — the verified path index, inline path storage, memchr line scans and the rebuilt-on-load wire format. - [Safety and stability](https://sourcier.vercel.app/explanation/safety-and-stability.md): How Sourcier forbids unsafe code, seals its traits, keeps error enums non_exhaustive, and pins behavior with a layered test suite. - [The two-phase lifecycle](https://sourcier.vercel.app/explanation/two-phase-lifecycle.md): Why SourceFilesMap splits into a mutable build phase and an immutable lookup phase, and how the type-state builder enforces the boundary. - [Why Sourcier exists](https://sourcier.vercel.app/explanation/why-sourcier.md): The problem of cheap diagnostics positions in compilers, linters and language servers, and the design Sourcier chose for it. ## Optional - [Packing source file IDs, lines, and columns into a single u64](https://sourcier.vercel.app/blog/welcome-to-sourcier.md)