#message #ros #generate #find #roslibrust

macro roslibrust_codegen_macro

Provides macro-based message generation for roslibrust

13 releases (breaking)

new 0.13.0 Mar 27, 2025
0.11.1 Oct 17, 2024
0.10.0 Jul 5, 2024
0.8.0 Oct 4, 2023
0.5.2 Oct 31, 2022

#2109 in Procedural macros

Download history 26/week @ 2024-12-04 43/week @ 2024-12-11 17/week @ 2024-12-18 50/week @ 2025-01-01 124/week @ 2025-01-08 34/week @ 2025-01-15 37/week @ 2025-01-22 22/week @ 2025-01-29 19/week @ 2025-02-05 54/week @ 2025-02-12 36/week @ 2025-02-19 121/week @ 2025-02-26 67/week @ 2025-03-05 90/week @ 2025-03-12 56/week @ 2025-03-19

349 downloads per month
Used in 2 crates

MIT license

100KB
2K SLoC

roslibrust_codegen_macro

This crate defines the proc-macro for generating ROS message types. It invokes APIs from the roslibrust_codegen crate.

Warning

This macro cannot detect if the message files it generates from have changed. If you are creating a crate which just contains your message definitions and won't be recompiled otherwise, you'll likely want to use roslibrust_codegen with a build.rs script.

Usage

If you're generating messages in an environment with ROS installed, no arguments need to be passed.

use roslibrust_codegen_macro::find_and_generate_ros_messages;

find_and_generate_ros_messages!();

If you're generating without ROS installed or your environment can't depend on the ROS_PACKAGE_PATH variable, you can specify additional paths to search:

use roslibrust_codegen_macro::find_and_generate_ros_messages;

find_and_generate_ros_messages!("/path/to/my/msg/package", "/opt/ros/noetic");

Dependencies

~5–14MB
~173K SLoC