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 a new language. It parses the source, builds a symbol table and a call graph, and writes them to the canonical JSON schema. Backends are standalone tools (the codeanalyzer-* family). You can write a backend in whichever language suits the analysis: Python analysis in Python, Java analysis in Java, and more.
  • A frontend is an SDK that reads that JSON and gives you an analysis API. Two frontends exist today: the Python SDK, which is the reference implementation, and an alpha TypeScript SDK. A Rust frontend is planned. See SDKs.

A new backend makes its language available to every existing frontend. A new frontend makes every existing backend available through it.