Thanks to visit codestin.com
Credit goes to lib.rs

#scip #symbols #ingestion #edge #occurrence #rust-analyzer #bit-set #enclosing

ckg-scip

SCIP (Source Code Intelligence Protocol) ingestion for ckg

9 stable releases

Uses new Rust 2024

new 1.1.3 May 12, 2026
1.0.8 May 12, 2026
1.0.1 May 11, 2026
1.0.0 May 9, 2026

#1411 in Filesystem


Used in ckg-cli

Apache-2.0

46KB
659 lines

SCIP (Source Code Intelligence Protocol) ingestion.

Reads an index.scip file produced by an external indexer (rust-analyzer / scip-rust, scip-python, scip-ruby) and translates it into ckg Symbols + Edges with confidence 1.0 — these come from a real semantic indexer, not heuristics.

Mapping:

  • SymbolInformationSymbol (kind translated from SCIP Kind)
  • Occurrence{role: Definition} → defines the symbol's location
  • Occurrence{role: Import}Imports edge from the document file → symbol
  • Occurrence with no role bit set (a reference) → Calls edge from the enclosing definition → symbol
  • SymbolInformation.relationshipsImplements / Extends edges

Run an indexer first, e.g.: scip-rust index --output index.scip scip-python index . scip-ruby --index .

Then ckg index --scip path/to/index.scip.

Module layout

  • parsing — path sanitization, qname extraction, symbol hashing
  • mapping — SCIP Kind/role → ckg Kind, occurrence position helpers
  • ingestingest_index main loop (document iteration, edge emission)

Dependencies

~8–12MB
~160K SLoC