#ros #codegen #macro #ros2 #proc-macro #client #environment

macro roslibrust_codegen_macro

Provides macro-based message generation for roslibrust

6 releases (breaking)

0.7.0 Mar 13, 2023
0.6.0 Dec 16, 2022
0.5.2 Oct 31, 2022
0.5.0 Sep 18, 2022
0.1.0 Aug 28, 2022

#1342 in Procedural macros

Download history 6/week @ 2022-12-04 27/week @ 2022-12-11 15/week @ 2022-12-18 11/week @ 2022-12-25 6/week @ 2023-01-01 44/week @ 2023-01-08 68/week @ 2023-01-15 61/week @ 2023-01-22 45/week @ 2023-01-29 48/week @ 2023-02-05 77/week @ 2023-02-12 83/week @ 2023-02-19 67/week @ 2023-02-26 56/week @ 2023-03-05 79/week @ 2023-03-12 81/week @ 2023-03-19

285 downloads per month
Used in roslibrust

MIT license

71KB
1.5K 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

~3.5–8.5MB
~141K SLoC