Crates.io | rtps-gen |
lib.rs | rtps-gen |
version | 0.2.0 |
source | src |
created_at | 2019-01-11 10:09:37.268211 |
updated_at | 2019-01-12 00:41:00.388647 |
description | A command line tool reading RTPS IDL and generating corresponding Rust data types. |
homepage | https://github.com/frehberg/rtps-gen.git |
repository | https://github.com/frehberg/rtps-gen.git |
max_upload_size | |
id | 107910 |
size | 31,943 |
A tool reading an IDL and generating corresponding Rust code.
Usage:
rtps-gen -I <include-dir> data.idl -o output.rs
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.
IDL-Type | Rust-Type |
---|---|
module | module |
boolean | bool |
char/wchar | char |
octet | u8 |
string/wstring | std::string::String |
short | i16 |
long | i32 |
long long | i64 |
unsigned short | u16 |
unsigned long | u32 |
unsigned long long | u64 |
float | f32 |
double | f64 |
fixed | NA |
enum | enum |
union | enum |
struct | struct |
sequence | std::vec::Vec |
array, eg. 'T a[N]' | native array '[T;N]' |
interface (non abstract) | NA |
interface (abstract) | NA |
constant (not within interface) | const |
constant (within an interface) | NA |
exception | std::result::Result |
Any | NA |
type declarations nested within interfaces | NA |
typedef | type |
pseudo objects | NA |
readonly attribute | NA |
readwrite attribute | NA |
operation | NA |