Generic, multi-target OMG IDL compiler written in Rust.
ic-idl parses OMG IDL4 interface definitions and generates type definitions, interfaces, and serialization code for multiple target languages. It supports C, C++, Rust, C#, Java, Python, and TypeScript. It can also convert IDL to other schema formats including Protobuf, JSON, JSON Schema, and XML.
In addition to being a full IDL compiler, ic-idl is designed as a modular compilation pipeline. Components such as the lexer, C-compliant preprocessor, IDL parser, and type-resolved IR are available as standalone crates for projects that only need IDL parsing or analysis. The pipeline is designed to be easily extended with new code generation backends, and can even be extended to support other input languages beyond IDL.
To create a release archive with the binary and runtime libraries:
cargo xtask releaseTo build and run the compiler from source:
cargo run --releaseRun unit tests:
cargo nextest run --workspace --all-targetsRun codegen tests:
cargo xtask codegenSee the codegen-tests directory for more information.
Run integration tests:
cargo xtask integrationSee the integration-tests directory for more information.
Generate development documentation:
cargo doc --document-private-items --no-deps --workspace