Skip to content

Target Generators

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

TargetCommon AliasesArtifact TypeTypical Combination
rustrsRust types and modulesRust libraries or applications
rust-jsonrpcrust_jsonrpc, rs_jsonrpc, rs-jsonrpcRust JSON-RPC bindingsxidl-jsonrpc
rust-axumrust_axum, axum, rs_axum, rs-axumRust HTTP / Stream bindingsxidl-rust-axum
typescripttsTypeScript declarations and SchemasFrontend or toolchains
typescript-resttypescript_rest, ts-rest, ts_restTypeScript REST client/server bindingsxidl-typescript-server
gogolangGo types or auxiliary codeGo projects
go-restgo_restGo HTTP bindingsGo HTTP services
openapiNoneopenapi_{filename}.jsonDocumentation and downstream consumption
openrpcopen-rpcopenrpc.jsonJSON-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