-
src/common/- Foundation for all sketches (api_common.md)input.rs-DataInputenum,HeapItem,HHItem, framework enums (HydraCounter,L2HH,HydraQuery)structures/- High-performance data structures (Vector1D,Vector2D,Vector3D,CommonHeap,MatrixStorage,FixedMatrix)heap.rs-HHHeapconvenience wrapper for heavy hitter trackinghash.rs- Hashing utilities (hash_for_matrix,hash64_seeded,SEEDLIST,BOTTOM_LAYER_FINDER) plusSketchHasherfor custom hasher injectionmode.rsis undersrc/sketches/and providesRegularPath/FastPathtype-level insert/estimate path selection
-
src/sketches/- Sketch implementations (status source: apis.md)Readyin API index:countminsketch.rs,countsketch.rs,hll.rs,kll.rs,ddsketch.rs,countminsketch_topk.rs,countsketch_topk.rsUnstablein API index:coco.rs,elastic.rs,uniform.rs,kmv.rs
-
src/sketch_framework/- Orchestration and serving layers (status source: apis.md)Readyin API index:hydra.rs,hashlayer.rs,univmon.rs,univmon_optimized.rs,nitro.rs,eh.rs,eh_sketch_list.rsUnstablein API index:eh_univ_optimized.rs- Infrastructure module:
orchestrator/(node-level manager used by framework APIs)
-
src/message_pack_format/- MessagePack wire-format definitions, theMessagePackCodectrait, and the wire-format-aligned sketch types shared withsketchlib-go(message_pack_format.md)portable/— wire-format-aligned sketch types (CountMinSketch,CountSketch,DdSketch,HllSketch,KllSketch,HydraKllSketch,CountMinSketchWithHeap,SetAggregator,DeltaResult) consumed by the ASAP query engine, byte-compatible withsketchlib-gonative/— Rust-internal codec shims oversrc/sketches/byte serialization
docs/- API and feature documentation- apis.md - Canonical API index with one page per API surface
- api_common.md - Common module canonical reference
- features.md - Feature status and roadmap
- The large precomputed hash/sample tables are no longer checked-in arrays;
they are built lazily at runtime via
std::sync::LazyLockinsrc/common/precompute_hash.rs,src/common/precompute_sample.rs, andsrc/common/precompute_sample2.rs.
-
proto/**/*.protois the cross-language wire-format source of truth shared withsketchlib-go. -
The corresponding Rust types are vendored under
src/proto/generated/sketchlib.v1.rsand re-exported bysrc/proto.rsascrate::proto::sketchlib. Downstream users therefore build the crate as pure Rust without needingprotocor any build script. -
To regenerate after editing any
.protofile, run from the repository root:cargo run --manifest-path tools/gen-proto/Cargo.toml
CI enforces that the committed file matches the result of regeneration.