tpt-proto20
RustSchema-first contract system for distributed Rust apps — native compiler, binary wire format, codegen, reflection, RPC/streaming, and clean-room Protobuf/gRPC compatibility adapters.
Languages
tpt-proto20
A next-generation, schema-first contract system for distributed applications.
tpt-proto20 combines a modern schema language, a pure-Rust compiler, a
compact binary wire format, a Rust-first runtime, generated code, reflection,
JSON/text representations, schema-evolution tooling, security-hardened
decoding, observability, and an RPC/streaming system — plus compatibility
adapters for the existing Protocol Buffers and gRPC ecosystems.
The goal is to let independently evolving programs communicate safely, efficiently, and predictably over time.
Documentation
See docs/ for in-depth guides — quickstart, schema language,
wire format, RPC model, compatibility adapters, security limits,
observability, code generation, CLI reference, and provenance policy — and
spec.txt for the full-scope design document.
Status
Work is in active development. Multiple phases are complete; remaining phases
are tracked in todo.md.
Workspace layout
compiler/tpt20-language/—.tptlexer, parser, and ASTcompiler/tpt20-ir/— neutral IR typescompiler/tpt20-descriptor/— compiled schema descriptorscompiler/tpt20-compiler/— semantic analysis, compatibility checks, IR/descriptor/codegen pipelinecompiler/tpt20-codegen-rust/— Rust code generatorruntime/tpt20-core/— native binary wire format, encode/decode,DecoderLimitsruntime/tpt20-reflect/— descriptor-driven dynamic encode/decode and reflectionruntime/tpt20-json/— JSON mapping for messagesruntime/tpt20-stdlib/— well-known types (timestamp, duration, any, uuid, etc.)runtime/tpt20-rpc/— RPC model, streaming, status codes, metadata, securityruntime/tpt20-transport/— HTTP/2, in-process, framing, metadata, endpointsruntime/tpt20-observability/— metrics, tracing, structured loggingcompat/tpt20-compat-protobuf/—.protoimport and protobuf wire adaptercompat/tpt20-compat-grpc/— gRPC-compatible transport and mappingtools/tpt20-cli/— developer CLI (tpt20 check,tpt20 gen rust, etc.)tools/tpt20-conformance/— native and compatibility conformance suitestests/— integration and conformance testsfuzz/— fuzz targets for decode paths, schema parsing, RPC framing, etc.provenance/— clean-room provenance and contribution policy
License
Dual-licensed under MIT or Apache-2.0.