Skip to content

XIDL

Drive HTTP, JSON-RPC, Rust code, OpenAPI, OpenRPC, and more with a single IDL.

XIDL is not just a “code generator”, but a workflow built around contract definitions: You write the IDL first, then generate server-side code, client-side code, schemas, auxiliary runtimes, and toolchain artifacts from the same contract.

One Contract, Multiple Outputs

The same IDL can generate Rust types, Axum HTTP interfaces, JSON-RPC bindings, OpenAPI, OpenRPC, and intermediate products for debugging and toolchains.

Explicit Protocol Rules

HTTP routes, parameter sources, streaming interactions, and security declarations are written directly in the contract, rather than scattered across various runtime frameworks and comment conventions.

Friendly to Both People and Tools

Structured IDL is convenient for team reviews and easy for generators, editors, language servers, and AI tools to understand and process.

Learn the Main Line First, Then Expand

The main line of documentation starts with xidlc and takes you through the shortest path to run your first HTTP + Rust example; other targets and protocols can be explored as needed.

  • Define HTTP APIs and generate rust-axum server/client code.
  • Define JSON-RPC interfaces and generate rust-jsonrpc bindings and openrpc.json.
  • Generate OpenAPI from the same contract to avoid drift between implementation and documentation specifications.
  • Integrate the generation process into Rust build.rs, or generate products manually via xidlc.
  • Establish auditable, traceable, and explicit declarations for streaming APIs and security policies.