Skip to content

All features are enabled by default and forwarded to the sourcier-core engine crate. You only configure features on the sourcier facade.

Feature Default Gates
serde yes Serialize/Deserialize for maps, positions and FeedbackSnapshot; wire-format loading
view yes LineOffsets, view, view_str, line_offsets, position_from_offset, offset_from_position, display_position
rt-feedback yes RuntimeFeedback, FeedbackSnapshot, with_feedback on map and builder
parallel no Multi-threaded line-offset index construction with rayon

serde adds the serialization derives and the payload-compatibility logic. Tools that keep positions only in memory can drop it.

view adds the per-file line index (a single memchr-accelerated scan, 4 bytes per line) and every byte-extraction and offset-bridge API. Diagnostics tools almost always keep it; pure id registries can drop it.

rt-feedback adds atomic counters behind Arc<RuntimeFeedback>. No locks are taken on the reporting path; the cost when unused is the unused code path.

parallel is opt-in because on a 2-core reference VM the thread-pool overhead outweighed the scan savings. Enable it on many-core build machines processing large file sets; it adds the rayon dependency.

Keep only byte extraction:

Cargo.toml
[dependencies]
sourcier = { version = "2.0", default-features = false, features = ["view"] }

Keep serialization but no views and no statistics:

Cargo.toml
[dependencies]
sourcier = { version = "2.0", default-features = false, features = ["serde"] }

Enable everything including parallelism:

Cargo.toml
[dependencies]
sourcier = { version = "2.0", features = ["parallel"] }

The minimum supported Rust version is 1.99 for every feature configuration; CI verifies cargo check across feature combinations.