RTPS IDL to Rust code generator library
A library reading IDL input and generating corresponding Rust data types
- Converting IDL types to Rust-types
- Converting IDL types to TokenStreams (hygiene proc-macros not stable yet)
Put this in your Cargo.toml:
## Cargo.toml file [dependencies] rtps-idl = "0.1"
RTPS-IDL to Rust Mapping
The IDL types are mapped onto Rust as follows.
If a type-mapping has not been decided, it is marked with 'NA'.
As RTPS is a data-centric framework in contrast to the the original OO background, the focus is put onto data structures, and ignoring interfaces and structures so far.
|unsigned long long||u64|
|array, eg. 'T a[N]'||native array '[T;N]'|
|interface (non abstract)||NA|
|constant (not within interface)||const|
|constant (within an interface)||NA|
|type declarations nested within interfaces||NA|
The underlying parser-generator being used is PEST
The original IDL-v4 grammar stems from kpansky, and has been adapted for the needs of this project.
The CDR Serde implementation will be the cdr-rs project at github.