Skip to content

Target Generators

This page summarizes the targets currently supported built-in by xidlc and their typical use cases.

Target Common Aliases Artifact Type Typical Combination
rust rs Rust types and modules Rust libraries or applications
rust-jsonrpc rust_jsonrpc, rs_jsonrpc, rs-jsonrpc Rust JSON-RPC bindings xidl-jsonrpc
rust-axum rust_axum, axum, rs_axum, rs-axum Rust HTTP / Stream bindings xidl-rust-axum
typescript ts TypeScript declarations and Schemas Frontend or toolchains
typescript-rest typescript_rest, ts-rest, ts_rest TypeScript REST client/server bindings xidl-typescript-server
go golang Go types or auxiliary code Go projects
go-rest go_rest Go HTTP bindings Go HTTP services
openapi None openapi_{filename}.json Documentation and downstream consumption
openrpc open-rpc openrpc_<stem>.json JSON-RPC documentation

Some generators support distinguishing between client and server artifacts, such as:

  • rust-axum
  • rust-jsonrpc
  • typescript-rest

If a target does not support this distinction, these parameters may be ignored or have no significant effect.

typescript-rest defaults to client-only generation. Use --server for server-only output, or --client --server to generate both sides.

  • Only data structures: Choose rust, typescript, or go.
  • HTTP service capabilities: Choose rust-axum, go-rest, or typescript-rest.
  • JSON-RPC: Choose rust-jsonrpc.
  • Publishing HTTP contracts externally: Choose openapi.
  • Publishing JSON-RPC contracts externally: Choose openrpc.
  • Debugging internal representations: Choose hir, rest-hir, or typed-ast.

In addition to generating code, XIDL can also generate OpenAPI and OpenRPC files suitable for HTTP and JSON-RPC:

  • openapi
  • openrpc