Skip to content

[arch] Persistent, queryable krapper service (on-demand resolution) #186

Description

@monkopedia-coder

Epic: single krapper binary + ksrpc service interface to the compiler (Jason's direction, 2026-07-26). This is brick 3 of 3. Depends on #184, #185.

Once krapper is one binary behind a typed ksrpc channel (#184, #185), it can stay alive across a Gradle daemon session instead of being a one-shot batch process, and answer questions on demand.

Query surface (sketch)

Why this matters beyond ergonomics

Two long-standing walls are consequences of the batch, parse-everything-up-front architecture:

Template instantiation manifests (--instantiate pre-declaration) also stop being necessary.

Open (needs-decision)

  • Process lifetime + ownership: Gradle daemon-scoped? build-scoped? Idle timeout?
  • Determinism and caching: an incremental/lazy binder must still produce byte-identical output for the same inputs (featuregen SYNC is the gate).
  • Memory: a persistent Clang instance holding ASTs across a daemon session.
  • Whether the FIR compiler plugin becomes a second client of the same service (today it reads @krapper.CppBinding annotations statically and re-derives the name mangling), or stays annotation-driven.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-workableClear, scoped, no user-judgment needed; triage dispatches work_on_issueenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions