Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5eb7cad
Message generation refactoring (#80)
nnmm Mar 18, 2022
c4163a4
Enable Clippy in CI (#83)
nnmm Mar 21, 2022
3818376
Give subscription callback the owned message (#92)
nnmm Apr 12, 2022
3c5a33f
Bump every package to version 0.2 (#100)
nnmm Apr 17, 2022
d12be8c
Document all public items (#94)
nnmm Apr 21, 2022
76ce7fd
Removed support for no_std (#109)
esteve Apr 21, 2022
4e00fdc
Add comments explaining each dependency (#122)
nnmm Apr 28, 2022
4ce9e04
Add serde support to messages (#131)
nnmm Apr 29, 2022
48b0247
Rename RMW-compatible to RMW-native (#159)
nnmm May 12, 2022
f87dd7b
Make all the things Send, and messages Sync as well (#171)
nnmm May 20, 2022
9aab53a
Add Nikolai and Jacob to authors in Cargo.toml and maintainers in pac…
nnmm May 23, 2022
38be820
Add unit testing (#84)
esteve Jun 14, 2022
fe2f93c
Fix a portability problem in rosidl_runtime_rs::String (#219)
nnmm Jul 8, 2022
2665187
Added support for clients and services (#146)
esteve Jul 8, 2022
3ae7d35
Fixes for releasing to crates.io (#231)
esteve Jul 21, 2022
e0f83cf
Implement Message for Box<T: Message> (#235)
LaVieEstDure Aug 1, 2022
0d72d26
Add support for loaned messages (#212)
nnmm Aug 16, 2022
e7d13b5
Generalize callbacks for subscriptions (#260)
nnmm Sep 20, 2022
5850929
Bump package versions to 0.3 (#274)
nnmm Oct 3, 2022
31341a6
Add README files for rclrs and rosidl_runtime_rs (#273)
nnmm Oct 3, 2022
6a0d919
Format all code with group_imports = StdExternalCrate (#272)
nnmm Oct 3, 2022
3503d17
Add TYPE_NAME constant to messages and make error fields public (#277)
nnmm Oct 5, 2022
991d3e1
Version 0.3.1 (#285)
nnmm Oct 17, 2022
625eed0
Remove libc dependencies (#284)
Tacha-S Oct 18, 2022
9dad536
Extend string types (#293)
maspe36 Nov 13, 2022
63706fb
Improve efficiency of deserializing strings (#300)
nnmm Mar 12, 2023
20127cf
- Upgraded bindgen to 0.66.1 (#323)
maspe36 Jul 24, 2023
6550ea0
Version 0.4.0 (#343)
esteve Nov 7, 2023
f4e79de
Revert "Version 0.4.0 (#343)" (#344)
esteve Nov 7, 2023
e5fc50e
Version 0.4.0 (#346)
esteve Nov 7, 2023
0570fc0
Allow rustdoc to run without a ROS distribution (#347)
esteve Nov 24, 2023
3944cea
Update GitHub actions (#352)
esteve Nov 28, 2023
85f23d6
Version 0.4.1 (#353)
esteve Nov 28, 2023
60c9922
Fix Unicode handling in String and WString (#362)
nwn Apr 26, 2024
4242802
Use nightly for style check (#396)
mxgrey May 13, 2024
38edbe9
Add parameter services (#342)
luca-della-vedova May 14, 2024
8e9f2de
Fix panic on sequence_init() when size is 0 (#407)
Oscarchoi Jun 21, 2024
c7b6a0f
Add in missing nullptr check when calling `std::slice::from_raw_parts…
maspe36 Sep 29, 2024
e22d669
Action message support (#417)
nwn Oct 26, 2024
4993476
Update for clippy 1.83 (#441)
mxgrey Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions rosidl_runtime_rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "rosidl_runtime_rs"
version = "0.4.1"
# This project is not military-sponsored, Jacob's employment contract just requires him to use this email address
authors = ["Esteve Fernandez <esteve@apache.org>", "Nikolai Morin <nnmmgit@gmail.com>", "Jacob Hassold <jacob.a.hassold.civ@army.mil>"]
edition = "2021"
license = "Apache-2.0"
description = "Message generation code shared by Rust projects in ROS 2"

[lib]
path = "src/lib.rs"

# Please keep the list of dependencies alphabetically sorted,
# and also state why each dependency is needed.
[dependencies]
# Optional dependency for making it possible to convert messages to and from
# formats such as JSON, YAML, Pickle, etc.
serde = { version = "1", optional = true }

[features]
default = []
# This feature is solely for the purpose of being able to generate documetation without a ROS installation
# The only intended usage of this feature is for docs.rs builders to work, and is not intended to be used by end users
generate_docs = []

[dev-dependencies]
# Needed for writing property tests
quickcheck = "1"
# Needed for testing serde support
serde_json = "1"

[build-dependencies]
# Needed for uploading documentation to docs.rs
cfg-if = "1.0.0"

[package.metadata.docs.rs]
features = ["generate_docs"]
5 changes: 5 additions & 0 deletions rosidl_runtime_rs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Common types and traits for ROS 2 messages in Rust

ROS 2 is a popular open source robotics framework, used in a variety of fields (self-driving cars, drones, humanoid robots, etc.). `rosidl_runtime_rs` is a library that is mainly used by generated code for ROS 2 messages.

Please see the docs in the [`ros2_rust` repo](https://github.com/ros2-rust/ros2_rust).
33 changes: 33 additions & 0 deletions rosidl_runtime_rs/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cfg_if::cfg_if! {
if #[cfg(not(feature="generate_docs"))] {
use std::env;
use std::path::Path;

const AMENT_PREFIX_PATH: &str = "AMENT_PREFIX_PATH";

fn get_env_var_or_abort(env_var: &'static str) -> String {
if let Ok(value) = env::var(env_var) {
value
} else {
panic!(
"{} environment variable not set - please source ROS 2 installation first.",
env_var
);
}
}
}
}

fn main() {
#[cfg(not(feature = "generate_docs"))]
{
let ament_prefix_path_list = get_env_var_or_abort(AMENT_PREFIX_PATH);
for ament_prefix_path in ament_prefix_path_list.split(':') {
let library_path = Path::new(ament_prefix_path).join("lib");
println!("cargo:rustc-link-search=native={}", library_path.display());
}
}

// Invalidate the built crate whenever this script changes
println!("cargo:rerun-if-changed=build.rs");
}
20 changes: 20 additions & 0 deletions rosidl_runtime_rs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<?xml-model
href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rosidl_runtime_rs</name>
<version>0.4.1</version>
<description>Message generation code shared by Rust projects in ROS 2</description>
<!-- This project is not military-sponsored, Jacob's employment contract just requires him to use this email address -->
<maintainer email="jacob.a.hassold.civ@army.mil">Jacob Hassold</maintainer>
<maintainer email="nnmmgit@gmail.com">Nikolai Morin</maintainer>
<license>Apache License 2.0</license>
<author email="jacob.a.hassold.civ@army.mil">Jacob Hassold</author>
<author email="nnmmgit@gmail.com">Nikolai Morin</author>

<depend>rosidl_runtime_c</depend>
<export>
<build_type>ament_cargo</build_type>
</export>
</package>
12 changes: 12 additions & 0 deletions rosidl_runtime_rs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![warn(missing_docs)]
//! Bindings to `rosidl_runtime_c` and related functionality for messages.

#[macro_use]
mod sequence;
pub use sequence::{BoundedSequence, Sequence, SequenceExceedsBoundsError};

mod string;
pub use string::{BoundedString, BoundedWString, String, StringExceedsBoundsError, WString};

mod traits;
pub use traits::{Action, ActionImpl, Message, RmwMessage, SequenceAlloc, Service};
Loading