Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "3"
members = [
"rustecal",
"rustecal-core",
Expand All @@ -23,5 +24,5 @@ members = [
"rustecal-samples/pubsub/serde_receive",
"rustecal-samples/service/mirror_client",
"rustecal-samples/service/mirror_client_instances",
"rustecal-samples/service/mirror_server"
]
"rustecal-samples/service/mirror_server",
]
2 changes: 1 addition & 1 deletion rustecal-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-core"
version = "0.1.6"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "Core API for Eclipse eCAL"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
2 changes: 1 addition & 1 deletion rustecal-core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::ptr;

use crate::components::EcalComponents;
use crate::configuration::Configuration;
use crate::error::{check, RustecalError};
use crate::error::{RustecalError, check};
use crate::types::Version;

/// Provides access to the core initialization, shutdown, and state‑checking functions of eCAL.
Expand Down
2 changes: 1 addition & 1 deletion rustecal-pubsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-pubsub"
version = "0.1.7"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "Publish/Subscribe API for Eclipse eCAL"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
22 changes: 7 additions & 15 deletions rustecal-pubsub/src/payload_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ thread_local! {
pub(crate) unsafe extern "C" fn write_full_cb(buffer: *mut c_void, size: usize) -> c_int {
CURRENT_WRITER.with(|cell| {
if let Some(writer_ptr) = *cell.borrow() {
let writer: &mut dyn PayloadWriter = &mut *writer_ptr;
let buf = std::slice::from_raw_parts_mut(buffer as *mut u8, size);
if writer.write_full(buf) {
0
} else {
-1
}
let writer: &mut dyn PayloadWriter = unsafe { &mut *writer_ptr };
let buf = unsafe { std::slice::from_raw_parts_mut(buffer as *mut u8, size) };
if writer.write_full(buf) { 0 } else { -1 }
} else {
-1
}
Expand All @@ -50,13 +46,9 @@ pub(crate) unsafe extern "C" fn write_full_cb(buffer: *mut c_void, size: usize)
pub(crate) unsafe extern "C" fn write_mod_cb(buffer: *mut c_void, size: usize) -> c_int {
CURRENT_WRITER.with(|cell| {
if let Some(writer_ptr) = *cell.borrow() {
let writer: &mut dyn PayloadWriter = &mut *writer_ptr;
let buf = std::slice::from_raw_parts_mut(buffer as *mut u8, size);
if writer.write_modified(buf) {
0
} else {
-1
}
let writer: &mut dyn PayloadWriter = unsafe { &mut *writer_ptr };
let buf = unsafe { std::slice::from_raw_parts_mut(buffer as *mut u8, size) };
if writer.write_modified(buf) { 0 } else { -1 }
} else {
-1
}
Expand All @@ -67,7 +59,7 @@ pub(crate) unsafe extern "C" fn write_mod_cb(buffer: *mut c_void, size: usize) -
pub(crate) unsafe extern "C" fn get_size_cb() -> usize {
CURRENT_WRITER.with(|cell| {
if let Some(writer_ptr) = *cell.borrow() {
let writer: &mut dyn PayloadWriter = &mut *writer_ptr;
let writer: &mut dyn PayloadWriter = unsafe { &mut *writer_ptr };
writer.get_size()
} else {
0
Expand Down
2 changes: 1 addition & 1 deletion rustecal-pubsub/src/publisher.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::payload_writer::{
get_size_cb, write_full_cb, write_mod_cb, PayloadWriter, CURRENT_WRITER,
CURRENT_WRITER, PayloadWriter, get_size_cb, write_full_cb, write_mod_cb,
};
use crate::types::TopicId;
use rustecal_core::types::DataTypeInfo;
Expand Down
2 changes: 1 addition & 1 deletion rustecal-pubsub/src/typed_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::types::TopicId;
use rustecal_core::types::DataTypeInfo;
use rustecal_sys::{eCAL_SDataTypeInformation, eCAL_SReceiveCallbackData, eCAL_STopicId};
use std::{
ffi::{c_void, CStr},
ffi::{CStr, c_void},
marker::PhantomData,
slice,
};
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/benchmarks/performance_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "performance_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustecal::{Ecal, EcalComponents, TypedSubscriber};
use rustecal_types_bytes::BytesMessage;
use std::thread::sleep;
use std::{
sync::{atomic::Ordering, Arc, Mutex},
sync::{Arc, Mutex, atomic::Ordering},
thread,
time::{Duration, Instant},
};
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/benchmarks/performance_send/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "performance_send"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/monitoring/logging_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "logging_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal"}
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/monitoring/monitoring_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "monitoring_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal"}
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/blob_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "blob_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/blob_send/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "blob_send"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/hello_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hello_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/hello_send/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hello_send"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
Expand Down
6 changes: 3 additions & 3 deletions rustecal-samples/pubsub/person_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "person_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"
build = "build.rs"

[dependencies]
prost = "0.13.5"
prost = "0.14"
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
rustecal-types-protobuf = { path = "../../../rustecal-types-protobuf" }

[build-dependencies]
prost-build = "0.13.5"
prost-build = "0.14"
6 changes: 3 additions & 3 deletions rustecal-samples/pubsub/person_send/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "person_send"
version = "0.1.0"
edition = "2021"
edition = "2024"
build = "build.rs"

[dependencies]
prost = "0.13.5"
prost = "0.14"
rustecal = { path = "../../../rustecal", features = ["pubsub"] }
rustecal-types-protobuf = { path = "../../../rustecal-types-protobuf" }

[build-dependencies]
prost-build = "0.13.5"
prost-build = "0.14"
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/serde_receive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "serde_receive"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/pubsub/serde_send/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "serde_send"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion rustecal-samples/service/mirror_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mirror_client"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["service"] }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mirror_client_instances"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["service"] }
2 changes: 1 addition & 1 deletion rustecal-samples/service/mirror_server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mirror_server"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
rustecal = { path = "../../../rustecal", features = ["service"] }
2 changes: 1 addition & 1 deletion rustecal-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-service"
version = "0.1.5"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "Server/Client API for Eclipse eCAL"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
4 changes: 2 additions & 2 deletions rustecal-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-sys"
version = "0.1.4"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
build = "build.rs"
description = "Raw FFI bindings to Eclipse eCAL C API"
license = "Apache-2.0"
Expand All @@ -13,7 +13,7 @@ keywords = ["ecal", "ipc", "pubsub", "server-client", "middleware"]
categories = ["network-programming", "api-bindings"]

[build-dependencies]
bindgen = "0.71"
bindgen = "0.72"

[features]
default = ["dynamic"]
Expand Down
2 changes: 1 addition & 1 deletion rustecal-types-bytes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-types-bytes"
version = "0.1.6"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "Vec<u8> type support for rustecal TypedPublisher/TypedSubscriber"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
4 changes: 2 additions & 2 deletions rustecal-types-protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-types-protobuf"
version = "0.1.4"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "Google Protobuf type support for rustecal TypedPublisher/TypedSubscriber"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand All @@ -12,6 +12,6 @@ keywords = ["ecal", "ipc", "pubsub", "message-support", "middleware"]
categories = ["network-programming", "api-bindings"]

[dependencies]
prost = "0.13"
prost = "0.14"
rustecal-core = { version = "0.1", path = "../rustecal-core" }
rustecal-pubsub = { version = "0.1", path = "../rustecal-pubsub" }
2 changes: 1 addition & 1 deletion rustecal-types-serde/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustecal-types-serde"
version = "0.1.4"
edition = "2021"
edition = "2024"
description = "JSON/CBOR/MessagePack type support for rustecal TypedPublisher/TypedSubscriber"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
2 changes: 1 addition & 1 deletion rustecal-types-serde/src/cbor_message.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::format_support::{short_type_name, FormatSupport};
use crate::format_support::{FormatSupport, short_type_name};
use crate::make_format;
use rustecal_core::types::DataTypeInfo;
use rustecal_pubsub::typed_publisher::PublisherMessage;
Expand Down
2 changes: 1 addition & 1 deletion rustecal-types-serde/src/json_message.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::format_support::{short_type_name, FormatSupport};
use crate::format_support::{FormatSupport, short_type_name};
use crate::make_format;
use rustecal_core::types::DataTypeInfo;
use rustecal_pubsub::typed_publisher::PublisherMessage;
Expand Down
2 changes: 1 addition & 1 deletion rustecal-types-serde/src/msgpack_message.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::format_support::{short_type_name, FormatSupport};
use crate::format_support::{FormatSupport, short_type_name};
use crate::make_format;
use rustecal_core::types::DataTypeInfo;
use rustecal_pubsub::typed_publisher::PublisherMessage;
Expand Down
2 changes: 1 addition & 1 deletion rustecal-types-string/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustecal-types-string"
version = "0.1.4"
authors = ["Rex Schilasky"]
edition = "2021"
edition = "2024"
description = "String type support for rustecal TypedPublisher/TypedSubscriber"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
2 changes: 1 addition & 1 deletion rustecal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustecal"
version = "0.1.6"
edition = "2021"
edition = "2024"
description = "Meta-crate for rustecal: re-exports core, pubsub and service APIs"
license = "Apache-2.0"
repository = "https://github.com/eclipse-ecal/rustecal"
Expand Down
Loading