Skip to content

[EPIC] tdbin adoption blockers for a real multi-language consumer (Rust + TypeScript + Kotlin) #66

Description

@MelbourneDeveloper

Tracking issue for everything typeDiagram needs to ship before a multi-language consumer can actually adopt tdbin.

The consumer

Deslop is a live duplicate-code analysis engine with four surfaces generated from one .td schema (docs/models/live-ipc.td, ~50 types):

Surface Language Wire types today
deslop-lsp Rust generated (--to rust + post-processing)
deslop-mcp Rust generated (same module)
VS Code extension + webview TypeScript generated (--to typescript + post-processing)
JetBrains plugin Kotlin hand-written — no target exists

Everything currently moves as newline-delimited JSON. One live report over our own repo is 797 KB / 712 clusters / 1688 occurrences across 475 files, re-serialised and re-parsed on every incremental generation, then again on every editor query. This is precisely tdbin's use case.

Note on scope: LSP and MCP both mandate JSON on their public transports, so tdbin would carry the private deslop-lspdeslop-mcp IPC channel and the on-disk report/cache artifacts — the two places that dominate our serialisation cost and are entirely ours to choose.

Blockers

Multi-language parity

Toolchain integration

Order that unblocks us fastest

  1. [BLOCKER] Publish the tdbin Rust runtime crate — generated codecs reference a crate that exists nowhere #60 + [BLOCKER] tdbin rejects struct-form union variants — verify fails on the first union in a real schema #61 — until both land, nothing else is testable end to end.
  2. tdbin encode/decode ignore generation config — codecs don't compile against configured field types #64 (or Add 'Any' / 'Json' field type for opaque payloads #28, which subsumes most of it) — makes generated Rust codecs compile against our real types.
  3. TypeScript tdbin codec: no CLI command, no List<T>, no scalar Option<T>, number not bigint #62 — second end of the wire; without it we maintain two encodings forever, which is worse than staying on JSON.
  4. --config cannot emit tdbin outputs — codecs go stale under --watch #65 — makes it maintainable.
  5. Add Kotlin/JVM target (--to kotlin) + Kotlin tdbin runtime — the JVM is the only major ecosystem missing #63 — brings the JVM client onto the same schema.

Related existing issues: #28 (opaque Json/Any type), #39 (field metadata), #41 (provenance header + --check), #51 (emitted-ADT template), #30 (pinned enum discriminants), #40 (payload-carrying unions lossy in C#).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions