Using xidlc
xidlc reads one or more .idl files and emits artifacts for a selected
target.
Minimal command
Short form:
CLI options
The current generator arguments are:
--lang,-l: select the target language or generator--out-dir,-o: choose the output directory--client: request client-only output for generators that support it--server: request server output for generators that support it--dry-run: parse and generate without writing files
Supported built-in targets
The repository currently recognizes these built-in targets:
ccpprustrust-jsonrpcrust-axumts/typescriptopenapiopenrpchirtyped-ast
Alias examples:
rust-axum,rust_axum, andaxumrust-jsonrpc,rust_jsonrpcts,typescript
Typical workflows
Generate Rust types
Generate an Axum server/client surface
Generate OpenAPI
Generate OpenRPC
End-to-end flow
- Write IDL definitions for your data and interfaces.
- Choose a target based on the runtime or schema artifact you need.
- Run
xidlc. - Compile or publish the generated output with the target’s runtime crate or consumer toolchain.
Choosing a target
- Choose
rustwhen you need Rust data types or shared models. - Choose
rust-axumwhen your interface is HTTP-oriented and you want generated server/client scaffolding for Axum. - Choose
rust-jsonrpcwhen your interface is JSON-RPC oriented. - Choose
openapiwhen you need an OpenAPI document for HTTP-oriented interfaces. - Choose
openrpcwhen you need a JSON-RPC schema document. - Choose
typescriptwhen you need TypeScript declarations and schemas from supported definitions.
For a detailed capability matrix, see Targets Reference.
Formatting
The compiler also exposes a formatter subcommand:
Use this when you want consistent formatting for supported languages and query files.