diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a822933..2c353e7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,9 +18,9 @@ jobs: with: components: clippy - name: Linting - run: cargo clippy --all-targets --features derive,nalgebra,rayon -- -D warnings + run: cargo clippy --all-targets --features derive,nalgebra,rayon,serde -- -D warnings - name: Tests - run: cargo test --features derive,nalgebra,rayon + run: cargo test --features derive,nalgebra,rayon,serde outdated: name: Outdated diff --git a/.github/workflows/r2r_galactic.yml b/.github/workflows/r2r_galactic.yml index ae0ec96..96b1cec 100644 --- a/.github/workflows/r2r_galactic.yml +++ b/.github/workflows/r2r_galactic.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_galactic --tag r2r_galactic - - run: docker run r2r_galactic cargo test --features r2r_msg,derive,nalgebra,rayon + - run: docker run r2r_galactic cargo test --features r2r_msg,derive,nalgebra,rayon,serde diff --git a/.github/workflows/r2r_humble.yml b/.github/workflows/r2r_humble.yml index aa2ec11..a8a1239 100644 --- a/.github/workflows/r2r_humble.yml +++ b/.github/workflows/r2r_humble.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_humble --tag r2r_humble - - run: docker run r2r_humble cargo test --features r2r_msg,derive,nalgebra,rayon + - run: docker run r2r_humble cargo test --features r2r_msg,derive,nalgebra,rayon,serde diff --git a/.github/workflows/r2r_iron.yml b/.github/workflows/r2r_iron.yml index 61db09e..944b0d3 100644 --- a/.github/workflows/r2r_iron.yml +++ b/.github/workflows/r2r_iron.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_iron --tag r2r_iron - - run: docker run r2r_iron cargo test --features r2r_msg,derive,nalgebra,rayon + - run: docker run r2r_iron cargo test --features r2r_msg,derive,nalgebra,rayon,serde diff --git a/.github/workflows/r2r_jazzy.yml b/.github/workflows/r2r_jazzy.yml index fc37262..b9b1d1e 100644 --- a/.github/workflows/r2r_jazzy.yml +++ b/.github/workflows/r2r_jazzy.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_jazzy --tag r2r_jazzy - - run: docker run r2r_jazzy cargo test --features r2r_msg,derive,nalgebra,rayon + - run: docker run r2r_jazzy cargo test --features r2r_msg,derive,nalgebra,rayon,serde diff --git a/.github/workflows/rclrs_humble.yml b/.github/workflows/rclrs_humble.yml index 6102b2e..e267e4e 100644 --- a/.github/workflows/rclrs_humble.yml +++ b/.github/workflows/rclrs_humble.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_humble --tag rclrs_humble - - run: docker run rclrs_humble cargo test --features derive,nalgebra,rayon + - run: docker run rclrs_humble cargo test --features derive,nalgebra,rayon,serde diff --git a/.github/workflows/rclrs_iron.yml b/.github/workflows/rclrs_iron.yml index 0259f63..14fa019 100644 --- a/.github/workflows/rclrs_iron.yml +++ b/.github/workflows/rclrs_iron.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_iron --tag rclrs_iron - - run: docker run rclrs_iron cargo test --features derive,nalgebra,rayon + - run: docker run rclrs_iron cargo test --features derive,nalgebra,rayon,serde diff --git a/.github/workflows/rclrs_jazzy.yml b/.github/workflows/rclrs_jazzy.yml index b570164..d39981e 100644 --- a/.github/workflows/rclrs_jazzy.yml +++ b/.github/workflows/rclrs_jazzy.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_jazzy --tag rclrs_jazzy - - run: docker run rclrs_jazzy cargo test --features derive,nalgebra,rayon + - run: docker run rclrs_jazzy cargo test --features derive,nalgebra,rayon,serde diff --git a/.github/workflows/rosrust_noetic.yml b/.github/workflows/rosrust_noetic.yml index bbf6403..683f7d8 100644 --- a/.github/workflows/rosrust_noetic.yml +++ b/.github/workflows/rosrust_noetic.yml @@ -105,4 +105,4 @@ jobs: - name: test run: | source /opt/ros/$ROS_DISTRO/setup.bash - cargo test --features rosrust_msg,derive,nalgebra,rayon + cargo test --features rosrust_msg,derive,nalgebra,rayon,serde diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 74b0da0..ca5a387 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,8 +21,8 @@ jobs: with: components: clippy - name: Linting - run: cargo clippy --all-targets --features derive,nalgebra,rayon -- -D warnings + run: cargo clippy --all-targets --features derive,nalgebra,rayon,serde -- -D warnings - name: Build examples with features - run: cargo build --examples --features derive,nalgebra,rayon + run: cargo build --examples --features derive,nalgebra,rayon,serde - name: Test library - run: cargo test --features derive,nalgebra,rayon + run: cargo test --features derive,nalgebra,rayon,serde diff --git a/.gitignore b/.gitignore index bef1c03..35ac367 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -Cargo.lock +Cargo.lock* .idea/ target/ diff --git a/README.md b/README.md index ebd441b..d692724 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,15 @@

+> [!IMPORTANT] +> The optional rosrust dependency currently breaks the build of this crate because of a yanked transitive dependency on crates.io. +> Use [this workaround](https://github.com/adnanademovic/rosrust/issues/210#issuecomment-2609494830) in your project when rosrust is needed. +> If you are not using rosrust at all, you can also use the main branch of this repository, where the integration is removed at the moment. +> ```toml +> [dependencies] +> ros_pointcloud2 = { version = "0.5.2", git = "https://github.com/stelzo/ros_pointcloud2.git" } +> ``` + ros_pointcloud2 uses its own type for the message `PointCloud2Msg` to keep the library framework agnostic. ROS1 and ROS2 are supported with feature flags. Get started with the example below, check out the other use cases in the `examples` folder or see the [Documentation](https://docs.rs/ros_pointcloud2/0.5.1/) for a complete guide. diff --git a/derive-test/Cargo.toml b/derive-test/Cargo.toml index 92b6f05..5ecb7f0 100644 --- a/derive-test/Cargo.toml +++ b/derive-test/Cargo.toml @@ -17,3 +17,7 @@ categories = [ [dependencies] ros_pointcloud2 = { path = "../rpcl2", features = ["std", "derive"] } rpcl2-derive = { path = "../rpcl2-derive" } + +[patch.crates-io] +# Fixes https://github.com/adnanademovic/rosrust/issues/210 +xml-rpc = { git = "https://github.com/locusrobotics/xml-rpc-rs", branch = "minimum-update" } diff --git a/rpcl2/Cargo.toml b/rpcl2/Cargo.toml index e3b713a..16b6a9e 100644 --- a/rpcl2/Cargo.toml +++ b/rpcl2/Cargo.toml @@ -31,8 +31,8 @@ exclude = [ rust-version = "1.77" [dependencies] -rosrust_msg = { version = "0.1", optional = true } -rosrust = { version = "0.9.11", optional = true } +#rosrust_msg = { version = "0.1", optional = true } +#rosrust = { version = "0.9.11", optional = true } r2r = { version = "0.9", optional = true } rayon = { version = "1", optional = true } nalgebra = { version = "0.33", optional = true, default-features = false } @@ -51,7 +51,7 @@ path = "benches/roundtrip.rs" [features] serde = ["dep:serde", "nalgebra/serde-serialize-no-std"] -rosrust_msg = ["dep:rosrust_msg", "dep:rosrust"] +#rosrust_msg = ["dep:rosrust_msg"] r2r_msg = ["dep:r2r"] rayon = ["dep:rayon"] derive = ["dep:rpcl2-derive"] diff --git a/rpcl2/src/lib.rs b/rpcl2/src/lib.rs index afe16b1..e51a875 100644 --- a/rpcl2/src/lib.rs +++ b/rpcl2/src/lib.rs @@ -139,6 +139,7 @@ #![cfg_attr(not(feature = "std"), no_std)] // Setup an allocator with #[global_allocator] // see: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html +#![allow(unexpected_cfgs)] pub mod points; pub mod prelude; diff --git a/rpcl2/tests/rosrust_msg_test.rs b/rpcl2/tests/rosrust_msg_test.rs index 2e7c795..0eee884 100644 --- a/rpcl2/tests/rosrust_msg_test.rs +++ b/rpcl2/tests/rosrust_msg_test.rs @@ -1,3 +1,5 @@ +#![allow(unexpected_cfgs)] // TODO remove when rosrust is fixed + #[cfg(feature = "rosrust_msg")] #[test] fn convertxyz_rosrust_msg() {