XIDL
XIDL (eXtensible IDL) is an OMG IDL-based code generator. It supports targets
such as c, cpp, rust, rust-axum, and rust-jsonrpc. XIDL is
plugin-capable and uses JSON-RPC as the plugin communication protocol.
Features
- Multi-language code generation from IDL
- Layered generation pipeline (
typed_ast/hir/ target code) - Pluggable codegen engines via JSON-RPC
- Built-in formatting for IDL / Rust / C++ / TypeScript
Quick Start
# Build
# Run tests
# Generate code (example)
Docs (Docusaurus)
Built-in Targets (current)
ccpprustrust-jsonrpcrust-axumts/typescript
Plugin Model
- During generation,
xidlcstarts a codegen engine based on the target language. - Built-in engines run in-process; unknown targets can be handled by external
xidl-<lang>plugins. - Plugins communicate with the host via JSON-RPC; see
xidlc/src/jsonrpc/ipc.idlfor the core interface.
Repository Layout
xidl-parser-derive: tree-sitter helper derive.xidl-parser: tree-sitter parser.xidlc: eXtensible IDL compiler.xidl-build: xidlc builder derive.xidl-jsonrpc: xidlc rust jsonrpc framework.xidl-playground: xidlc playground.xidl-rust-axum: xidlc rust axum codegen framework.xidl-typeobject: omg dds typeobject.xidl-xcdr: omg dds xcdr.xidlc-examples: examples