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
gogolangGo types or auxiliary codeGo projects
go-restgo_restGo HTTP bindingsGo HTTP services
pythonpyPython code generationPython projects
python-restpy_rest, python_restPython HTTP bindingsPython 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

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

  • Only data structures: Choose rust, typescript, go, or python.
  • HTTP service capabilities: Choose rust-axum, go-rest, or python-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