Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/remove zenoh collections #1771

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
14 changes: 3 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ resolver = "2"
members = [
"commons/zenoh-buffers",
"commons/zenoh-codec",
"commons/zenoh-collections",
"commons/zenoh-config",
"commons/zenoh-core",
"commons/zenoh-crypto",
Expand Down Expand Up @@ -160,6 +159,7 @@ serde = { version = "1.0.210", default-features = false, features = [
serde_json = "1.0.128"
serde_with = "3.12.0"
serde_yaml = "0.9.34"
smallvec = "1.13.2"
static_init = "1.0.3"
stabby = "36.1.1"
sha3 = "0.10.8"
Expand Down Expand Up @@ -206,7 +206,6 @@ zenoh-util = { version = "1.2.1", path = "commons/zenoh-util" }
zenoh-crypto = { version = "1.2.1", path = "commons/zenoh-crypto" }
zenoh-codec = { version = "1.2.1", path = "commons/zenoh-codec" }
zenoh-sync = { version = "1.2.1", path = "commons/zenoh-sync" }
zenoh-collections = { version = "1.2.1", path = "commons/zenoh-collections", default-features = false }
zenoh-macros = { version = "1.2.1", path = "commons/zenoh-macros" }
zenoh-plugin-trait = { version = "1.2.1", path = "plugins/zenoh-plugin-trait", default-features = false }
zenoh_backend_traits = { version = "1.2.1", path = "plugins/zenoh-backend-traits", default-features = false }
Expand Down
6 changes: 0 additions & 6 deletions DEFAULT_CONFIG.json5
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,6 @@
},
/// Configure the zenoh RX parameters of a link
rx: {
/// Receiving buffer size in bytes for each link
/// The default the rx_buffer_size value is the same as the default batch size: 65535.
/// For very high throughput scenarios, the rx_buffer_size can be increased to accommodate
/// more in-flight data. This is particularly relevant when dealing with large messages.
/// E.g. for 16MiB rx_buffer_size set the value to: 16777216.
buffer_size: 65535,
/// Maximum size of the defragmentation buffer at receiver end.
/// Fragmented messages that are larger than the configured size will be dropped.
/// The default value is 1GiB. This would work in most scenarios.
Expand Down
2 changes: 1 addition & 1 deletion commons/zenoh-buffers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ test = ["rand"]

[dependencies]
rand = { workspace = true, optional = true }
zenoh-collections = { workspace = true, default-features = false }
smallvec = { workspace = true }
8 changes: 4 additions & 4 deletions commons/zenoh-buffers/src/zbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use core::{cmp, iter, num::NonZeroUsize, ptr::NonNull};
#[cfg(feature = "std")]
use std::io;

use zenoh_collections::SingleOrVec;
use smallvec::SmallVec;

use crate::{
buffer::{Buffer, SplitBuffer},
Expand All @@ -30,14 +30,14 @@ use crate::{

#[derive(Debug, Clone, Default, Eq)]
pub struct ZBuf {
slices: SingleOrVec<ZSlice>,
slices: SmallVec<[ZSlice; 1]>,
}

impl ZBuf {
#[must_use]
pub const fn empty() -> Self {
pub fn empty() -> Self {
Self {
slices: SingleOrVec::empty(),
slices: SmallVec::new(),
}
}

Expand Down
6 changes: 6 additions & 0 deletions commons/zenoh-buffers/src/zslice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ impl ZSlice {
self.len() == 0
}

#[doc(hidden)]
#[inline]
pub fn capacity(&self) -> usize {
self.buf.as_slice().len()
}

#[inline]
#[must_use]
pub fn as_slice(&self) -> &[u8] {
Expand Down
36 changes: 0 additions & 36 deletions commons/zenoh-collections/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions commons/zenoh-collections/README.md

This file was deleted.

34 changes: 0 additions & 34 deletions commons/zenoh-collections/src/lib.rs

This file was deleted.

85 changes: 0 additions & 85 deletions commons/zenoh-collections/src/ring_buffer.rs

This file was deleted.

Loading
Loading