Expand description
A library for generating rust type definitions from ROS IDL files Supports both ROS1 and ROS2. Generated types implement roslibrust’s MessageType and ServiceType traits making them compatible with all roslibrust backends.
This library is a pure rust implementation from scratch and requires no ROS installation.
See example_package for how best to integrate this crate with build.rs
Directly depending on this crate is not recommended. Instead access it via roslibrust with the codegen
feature enabled.
Re-exports§
pub use ::serde;
pub use serde_bytes;
pub use integral_types::*;
Modules§
Structs§
- Constant
Info - Describes all information for a constant within a message Note: Constants are not fully supported yet (waiting on codegen support)
- Field
Info - Describes all information for an individual field
- Field
Type - Describes the type for an individual field in a message
- Message
File - RosLiteral
- Stores the ROS string representation of a literal
- Service
File
Traits§
- BigArray
- The big array serialization helper trait
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Deserialize
Owned - A data structure that can be deserialized without borrowing any data from the deserializer.
- Serialize
- A data structure that can be serialized into any data format supported by Serde.
Functions§
- find_
and_ generate_ ros_ messages - Searches a list of paths for ROS packages and generates struct definitions and implementations for message files and service files in packages it finds. Returns a tuple of the generated source code and list of file system paths that if modified would trigger re-generation of the source. This function is designed to be used either in a build.rs file or via the roslibrust_codegen_macro crate.
- find_
and_ generate_ ros_ messages_ without_ ros_ package_ path - Searches a list of paths for ROS packages and generates struct definitions and implementations for message files and service files in packages it finds. Returns a tuple of the generated source code and list of file system paths that if modified would trigger re-generation of the source. This function is designed to be used either in a build.rs file or via the roslibrust_codegen_macro crate.
- find_
and_ parse_ ros_ messages - Searches a list of paths for ROS packages to find their associated message and service files, parsing and performing dependency resolution on those it finds. Returns a map of PACKAGE_NAME/MESSAGE_NAME strings to message file data and vector of service file data.
- generate_
ros_ messages_ for_ packages - Generates struct definitions and implementations for message and service files in the given packages.
- generate_
rust_ ros_ message_ definitions - Takes in collections of ROS message and ROS service data and generates Rust source code corresponding to the definitions.
- resolve_
dependency_ graph
Derive Macros§
- Deserialize
- Serialize
- Smart
Default - Smart Default