-
-
Notifications
You must be signed in to change notification settings - Fork 0
Development
This page covers building, testing, and the repository layout for contributors.
-
Rust 1.95, pinned in
rust-toolchain.toml(withrustfmtandclippycomponents). - Edition 2021. The workspace
rust-versionis1.95.
These are the exact commands CI runs:
# Format check
cargo fmt --all --check
# Lint (warnings are errors)
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Full test suite
cargo test --workspace --all-featuresA release build of just the binary:
cargo build --release --locked -p codegraphEvery language extractor can be built and tested in isolation so a grammar bump that silently drops nodes or edges fails on its own:
cargo test -p codegraph-extract --no-default-features --features lang-rustCI runs this across a matrix of grammar-backed languages. See Languages.
.github/workflows/ci.yml runs on every push and pull request with three jobs:
-
lint -
cargo fmt --all --checkandcargo clippy ... -D warnings. -
test -
cargo test --workspace --all-featureson Linux, macOS, and Windows. -
extract-langs - a matrix that tests each grammar-backed language on its own
(
--no-default-features --features lang-<name>).
.github/workflows/release.yml runs on v* tags (and manual dispatch): it cross-compiles
the binary for Linux (x86_64), macOS (x86_64 and aarch64), and Windows (x86_64),
packages each with the README/LICENSE/CHANGELOG, and publishes a GitHub Release.
Several crates ship Criterion benchmarks (for example codegraph-extract,
codegraph-detect, codegraph-output). Run them with:
cargo benchcrates/
codegraph-core/ data model + graph.json DTO + validation
codegraph-detect/ discovery, classification, ignore rules
codegraph-extract/ tree-sitter + regex extractors (lang-* features)
codegraph-graph/ build, dedup, clustering, analysis
codegraph-semantic/ LLM semantic pass
codegraph-llm/ LLM client + provider registry
codegraph-query/ query / path / explain / affected
codegraph-output/ graph.json + viewers + exports
codegraph-report/ GRAPH_REPORT.md
codegraph-ingest/ external-source ingestion
codegraph-server/ MCP server + REST
codegraph-prs/ PR dashboard
codegraph-incremental/ incremental rebuild, watch, hooks
codegraph-workspace/ multi-repo federation
codegraph-skillgen/ assistant skill + hooks generation
bin/
codegraph/ the CLI
See Architecture for what each crate does and how the pipeline fits together.
- All shared dependencies are declared once in the root
Cargo.toml[workspace.dependencies]and referenced withworkspace = truefrom member crates. - The graph output is deterministic; tests assert byte-stable
graph.jsonwhere relevant, so avoid introducing nondeterministic iteration order. - Edges carry an explicit confidence level; prefer
INFERRED/AMBIGUOUSoverEXTRACTEDwhen a relationship is heuristic.
Getting started
Concepts
Using CodeGraph
Integrations
Scaling
Reference