Skip to content

Contributing

CLDK has two independent extension points: language backends and frontend SDKs.

flowchart LR
    subgraph Backends["Backends: emit canonical JSON"]
      direction TB
      G["codeanalyzer-go<br/>(new!)"]
      J["codeanalyzer-java"]
      P["codeanalyzer-python"]
    end
    subgraph Frontends["Frontends: consume canonical JSON"]
      direction TB
      PY["Python SDK (cldk)"]
      RS["Rust SDK<br/>(planned)"]
    end
    Backends -->|typed JSON| Frontends
  • A backend adds support for a new language. It parses source, builds a symbol table and call graph, and serializes them to the canonical JSON schema. Backends are standalone tools (the codeanalyzer-* family) and may be implemented in whichever language suits the analysis: Python analysis in Python, Java analysis in Java, and so on.
  • A frontend is an SDK that consumes that JSON and exposes an analysis API. One frontend exists today, the Python SDK; a Rust frontend is on the roadmap.

Adding a backend makes the new language available to every existing frontend. Adding a frontend makes every existing backend available through it.