ros2_rust
ros2_rust copied to clipboard
Optimize Serde implementations for rosidl_runtime_rs types
Particularly:
- The String Deserialize implementation first creates a Rust String, but it could potentially directly construct a
rosidl_runtime_rs::String. Same forWStringand the sequences types (which use a temporaryVec). - The String Serialize implementation also creates a Rust String even though it wouldn't need to.
The sequence serialization implementations are already as efficient as they can be, I believe.
This is a tricky task that is best suited for someone who's quite familiar with the Serde data model, so I'm adding the needs-rust-expert label.