From 1e2127c103bb47b417b2fd6ca8ef4ffe239f996c Mon Sep 17 00:00:00 2001 From: Juhana Helovuo Date: Mon, 18 Sep 2023 11:28:04 +0300 Subject: [PATCH] Version 0.8.5. Deprecate built-in ros2 module. Fix security dependency versions. --- Cargo.toml | 14 +++++++------- README.md | 7 +++++++ .../{ => deprecated}/ros_visualizer/.gitignore | 0 .../{ => deprecated}/ros_visualizer/README.md | 0 .../ros_visualizer/display_string.rs | 0 .../ros_visualizer/logging-config.yaml | 0 examples/{ => deprecated}/ros_visualizer/main.rs | 0 .../{ => deprecated}/ros_visualizer/messages.rs | 0 .../ros_visualizer/stateful_list.rs | 0 .../ros_visualizer/visualization_helpers.rs | 0 .../ros_visualizer/visualizator_app.rs | 0 .../{ => deprecated}/turtle_teleop/.gitignore | 0 examples/{ => deprecated}/turtle_teleop/README.md | 0 .../{ => deprecated}/turtle_teleop/log4rs.yaml | 0 examples/{ => deprecated}/turtle_teleop/main.rs | 0 examples/{ => deprecated}/turtle_teleop/ui.rs | 0 src/dds/pubsub.rs | 15 ++++++++++++--- src/lib.rs | 4 ++-- src/rtps/dp_event_loop.rs | 7 ++++++- 19 files changed, 34 insertions(+), 13 deletions(-) rename examples/{ => deprecated}/ros_visualizer/.gitignore (100%) rename examples/{ => deprecated}/ros_visualizer/README.md (100%) rename examples/{ => deprecated}/ros_visualizer/display_string.rs (100%) rename examples/{ => deprecated}/ros_visualizer/logging-config.yaml (100%) rename examples/{ => deprecated}/ros_visualizer/main.rs (100%) rename examples/{ => deprecated}/ros_visualizer/messages.rs (100%) rename examples/{ => deprecated}/ros_visualizer/stateful_list.rs (100%) rename examples/{ => deprecated}/ros_visualizer/visualization_helpers.rs (100%) rename examples/{ => deprecated}/ros_visualizer/visualizator_app.rs (100%) rename examples/{ => deprecated}/turtle_teleop/.gitignore (100%) rename examples/{ => deprecated}/turtle_teleop/README.md (100%) rename examples/{ => deprecated}/turtle_teleop/log4rs.yaml (100%) rename examples/{ => deprecated}/turtle_teleop/main.rs (100%) rename examples/{ => deprecated}/turtle_teleop/ui.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index aaee5d18..80a6bb86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustdds" -version = "0.8.4" +version = "0.8.5" authors = ["Juhana Helovuo ", "Oiva Moisio ", "Miska Melkinen ", @@ -64,14 +64,14 @@ serde-xml-rs = { version = "0.6" , optional = true } # for reading spec-mandated glob = { version = "0.3" , optional = true } # for reading spec-mandated XML config files mailparse = { version = "0.14" , optional = true } # for reading S/MIME-encoded (XML) config files x509-certificate = { version = "0.21" , optional = true } # for configuration certificates -x509-cert = { version = "*" , optional = true } +x509-cert = { version = "0.2" , optional = true } tempfile = { version = "3" , optional = true } # for calling external openssl command. Remove when no longer used. newline-converter = { version = "0.3" , optional = true } # helper for handling S/MIME -ring = { version = "*" , optional = true } # Cryptographic primitives -cms = { version = "*" , optional = true } # for ASN.1 parsing -der = { version = "*" , optional = true } # ASN.1 DER encoding -bcder = { version = "*" , optional = true } # ASN.1 DER encoding -const-oid = { version = "*" , optional = true } # more ASN.1 +ring = { version = "0.16" , optional = true } # Cryptographic primitives +cms = { version = "0.2" , optional = true } # for ASN.1 parsing +der = { version = "0.7" , optional = true } # ASN.1 DER encoding +bcder = { version = "0.7" , optional = true } # ASN.1 DER encoding +const-oid = { version = "0.9" , optional = true } # more ASN.1 [target.'cfg(windows)'.dependencies] local-ip-address = "0.5.3" diff --git a/README.md b/README.md index 87e0889b..43507876 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,13 @@ Currently, the implementation is complete enough to do data exchange with [ROS2] The [ros2-client](https://crates.io/crates/ros2-client) is recommended for talking to ROS components. The `ros2` module within RustDDS should not be used anymore. +## Version 0.8.5 + +* Feature `security` merged to master, but it is still work-in-progress, so does not work yet. +* Should work on Windows again +* Less strict lifetime bound in deserialization +* Simplify Key trait usage + ## Version 0.8 New features: diff --git a/examples/ros_visualizer/.gitignore b/examples/deprecated/ros_visualizer/.gitignore similarity index 100% rename from examples/ros_visualizer/.gitignore rename to examples/deprecated/ros_visualizer/.gitignore diff --git a/examples/ros_visualizer/README.md b/examples/deprecated/ros_visualizer/README.md similarity index 100% rename from examples/ros_visualizer/README.md rename to examples/deprecated/ros_visualizer/README.md diff --git a/examples/ros_visualizer/display_string.rs b/examples/deprecated/ros_visualizer/display_string.rs similarity index 100% rename from examples/ros_visualizer/display_string.rs rename to examples/deprecated/ros_visualizer/display_string.rs diff --git a/examples/ros_visualizer/logging-config.yaml b/examples/deprecated/ros_visualizer/logging-config.yaml similarity index 100% rename from examples/ros_visualizer/logging-config.yaml rename to examples/deprecated/ros_visualizer/logging-config.yaml diff --git a/examples/ros_visualizer/main.rs b/examples/deprecated/ros_visualizer/main.rs similarity index 100% rename from examples/ros_visualizer/main.rs rename to examples/deprecated/ros_visualizer/main.rs diff --git a/examples/ros_visualizer/messages.rs b/examples/deprecated/ros_visualizer/messages.rs similarity index 100% rename from examples/ros_visualizer/messages.rs rename to examples/deprecated/ros_visualizer/messages.rs diff --git a/examples/ros_visualizer/stateful_list.rs b/examples/deprecated/ros_visualizer/stateful_list.rs similarity index 100% rename from examples/ros_visualizer/stateful_list.rs rename to examples/deprecated/ros_visualizer/stateful_list.rs diff --git a/examples/ros_visualizer/visualization_helpers.rs b/examples/deprecated/ros_visualizer/visualization_helpers.rs similarity index 100% rename from examples/ros_visualizer/visualization_helpers.rs rename to examples/deprecated/ros_visualizer/visualization_helpers.rs diff --git a/examples/ros_visualizer/visualizator_app.rs b/examples/deprecated/ros_visualizer/visualizator_app.rs similarity index 100% rename from examples/ros_visualizer/visualizator_app.rs rename to examples/deprecated/ros_visualizer/visualizator_app.rs diff --git a/examples/turtle_teleop/.gitignore b/examples/deprecated/turtle_teleop/.gitignore similarity index 100% rename from examples/turtle_teleop/.gitignore rename to examples/deprecated/turtle_teleop/.gitignore diff --git a/examples/turtle_teleop/README.md b/examples/deprecated/turtle_teleop/README.md similarity index 100% rename from examples/turtle_teleop/README.md rename to examples/deprecated/turtle_teleop/README.md diff --git a/examples/turtle_teleop/log4rs.yaml b/examples/deprecated/turtle_teleop/log4rs.yaml similarity index 100% rename from examples/turtle_teleop/log4rs.yaml rename to examples/deprecated/turtle_teleop/log4rs.yaml diff --git a/examples/turtle_teleop/main.rs b/examples/deprecated/turtle_teleop/main.rs similarity index 100% rename from examples/turtle_teleop/main.rs rename to examples/deprecated/turtle_teleop/main.rs diff --git a/examples/turtle_teleop/ui.rs b/examples/deprecated/turtle_teleop/ui.rs similarity index 100% rename from examples/turtle_teleop/ui.rs rename to examples/deprecated/turtle_teleop/ui.rs diff --git a/src/dds/pubsub.rs b/src/dds/pubsub.rs index 86acae8e..22386203 100644 --- a/src/dds/pubsub.rs +++ b/src/dds/pubsub.rs @@ -38,7 +38,6 @@ use crate::{ reader::ReaderIngredients, writer::{WriterCommand, WriterIngredients}, }, - security::security_plugins::SecurityPluginsHandle, serialization::{cdr_deserializer::CDRDeserializerAdapter, cdr_serializer::CDRSerializerAdapter}, structure::{ entity::RTPSEntity, @@ -53,6 +52,16 @@ use super::{ with_key::simpledatareader::ReaderCommand, }; +#[cfg(feature = "security")] +use crate::{ + security::security_plugins::SecurityPluginsHandle, +}; + +#[cfg(not(feature = "security"))] +use crate::{ + no_security::security_plugins::SecurityPluginsHandle, +}; + // ------------------------------------------------------------------- /// DDS Publisher @@ -250,7 +259,7 @@ impl Publisher { .create_datawriter(self, Some(entity_id), topic, qos, writer_like_stateless) } - #[cfg(feature = "security")] // to avoid "never used" warning + #[cfg(feature="security")] // to avoid "never used" warning pub(crate) fn create_datawriter_with_entity_id_no_key( &self, entity_id: EntityId, @@ -791,7 +800,7 @@ impl Subscriber { .create_datareader(self, topic, Some(entity_id), qos, reader_like_stateless) } - #[cfg(feature = "security")] // to avoid "never used" warning + #[cfg(feature="security")] // to avoid "never used" warning pub(crate) fn create_datareader_with_entity_id_no_key( &self, topic: &Topic, diff --git a/src/lib.rs b/src/lib.rs index 8b9e7419..aad6f0c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -177,8 +177,6 @@ mod security; #[cfg(not(feature = "security"))] mod no_security; -#[cfg(not(feature = "security"))] -use no_security as security; pub(crate) mod structure; @@ -189,6 +187,8 @@ mod mio_source; // Public modules pub mod dds; // this is public, but not advertised + +#[deprecated(since = "0.8.5", note = "Use crate ros2-client instead.")] pub mod ros2; /// Helpers for (De)serialization and definitions of (De)serializer adapters pub mod serialization; diff --git a/src/rtps/dp_event_loop.rs b/src/rtps/dp_event_loop.rs index 693c3355..57a586cb 100644 --- a/src/rtps/dp_event_loop.rs +++ b/src/rtps/dp_event_loop.rs @@ -26,7 +26,6 @@ use crate::{ rtps_writer_proxy::RtpsWriterProxy, writer::{Writer, WriterIngredients}, }, - security::security_plugins::SecurityPluginsHandle, structure::{ dds_cache::DDSCache, entity::RTPSEntity, @@ -35,6 +34,12 @@ use crate::{ }; #[cfg(feature = "security")] use crate::discovery::secure_discovery::AuthenticationStatus; +#[cfg(feature = "security")] +use crate::security::security_plugins::SecurityPluginsHandle; + +#[cfg(not(feature = "security"))] +use crate::no_security::security_plugins::SecurityPluginsHandle; + pub struct DomainInfo { pub domain_participant_guid: GUID,