#serde #receipt #code-analysis #schema #type

tokmd-types

Core data types and contracts for tokmd. Tier 1 stability.

9 stable releases

Uses new Rust 2024

1.10.0 Apr 30, 2026
1.9.0 Mar 28, 2026
1.7.2 Feb 25, 2026
1.3.0 Jan 31, 2026

#16 in #receipt

Download history 10/week @ 2026-02-18 31/week @ 2026-02-25 100/week @ 2026-03-04 60/week @ 2026-03-11 88/week @ 2026-03-18 62/week @ 2026-03-25 42/week @ 2026-04-01 73/week @ 2026-04-08 78/week @ 2026-04-15 81/week @ 2026-04-22 56/week @ 2026-04-29 63/week @ 2026-05-06

293 downloads per month
Used in 40 crates (30 directly)

MIT/Apache

140KB
1.5K SLoC

tokmd-types

Core receipt and schema contracts for tokmd.

Problem

Receipts, rows, and enums need one stable serde contract without pulling in CLI or scan logic.

What it gives you

  • Core rows and totals: Totals, LangRow, ModuleRow, FileRow
  • Receipt wrappers: LangReceipt, ModuleReceipt, ExportReceipt, ContextReceipt, DiffReceipt, RunReceipt
  • Shared enums and helpers: TableFormat, ExportFormat, ConfigMode, ChildrenMode, ChildIncludeMode, RedactMode, AnalysisFormat, FileKind, ScanStatus
  • Contract markers: SCHEMA_VERSION, HANDOFF_SCHEMA_VERSION, CONTEXT_SCHEMA_VERSION, CONTEXT_BUNDLE_SCHEMA_VERSION

API / usage notes

  • Use this crate for serde-compatible receipt payloads and report rows.
  • Enable the clap feature only if you need derive support for the exported enums.
  • src/lib.rs is the source of truth for field names, schema versions, and wrapper shapes.

Go deeper

Dependencies

~0.2–1MB
~20K SLoC