diff --git a/zenoh/src/lib.rs b/zenoh/src/lib.rs index 2a238ea875..b8be3d905c 100644 --- a/zenoh/src/lib.rs +++ b/zenoh/src/lib.rs @@ -362,19 +362,32 @@ pub mod internal { #[cfg(all(feature = "unstable", feature = "shared-memory"))] pub mod shm { - pub use zenoh_shm::api::client_storage::SharedMemoryClientStorage; - pub use zenoh_shm::api::provider::shared_memory_provider::{BlockOn, GarbageCollect}; - pub use zenoh_shm::api::provider::shared_memory_provider::{Deallocate, Defragment}; - pub use zenoh_shm::api::provider::types::AllocAlignment; - pub use zenoh_shm::api::provider::types::MemoryLayout; - pub use zenoh_shm::api::slice::zsliceshm::{zsliceshm, ZSliceShm}; - pub use zenoh_shm::api::slice::zsliceshmmut::{zsliceshmmut, ZSliceShmMut}; - pub use zenoh_shm::api::{ - protocol_implementations::posix::{ - posix_shared_memory_client::PosixSharedMemoryClient, - posix_shared_memory_provider_backend::PosixSharedMemoryProviderBackend, - protocol_id::POSIX_PROTOCOL_ID, + pub use zenoh_shm::api::client::{ + shared_memory_client::SharedMemoryClient, shared_memory_segment::SharedMemorySegment, + }; + pub use zenoh_shm::api::client_storage::{SharedMemoryClientStorage, GLOBAL_CLIENT_STORAGE}; + pub use zenoh_shm::api::common::types::{ChunkID, ProtocolID, SegmentID}; + pub use zenoh_shm::api::protocol_implementations::posix::{ + posix_shared_memory_client::PosixSharedMemoryClient, + posix_shared_memory_provider_backend::{ + LayoutedPosixSharedMemoryProviderBackendBuilder, PosixSharedMemoryProviderBackend, + PosixSharedMemoryProviderBackendBuilder, }, - provider::shared_memory_provider::SharedMemoryProviderBuilder, + protocol_id::POSIX_PROTOCOL_ID, + }; + pub use zenoh_shm::api::provider::shared_memory_provider::{ + AllocBuilder, AllocLayout, AllocLayoutAlignedBuilder, AllocLayoutBuilder, + AllocLayoutSizedBuilder, AllocPolicy, AsyncAllocPolicy, BlockOn, DeallocEldest, + DeallocOptimal, DeallocYoungest, Deallocate, Defragment, DynamicProtocolID, + ForceDeallocPolicy, GarbageCollect, JustAlloc, ProtocolIDSource, SharedMemoryProvider, + SharedMemoryProviderBuilder, SharedMemoryProviderBuilderBackendID, + SharedMemoryProviderBuilderID, StaticProtocolID, + }; + pub use zenoh_shm::api::provider::types::{ + AllocAlignment, BufAllocResult, ChunkAllocResult, MemoryLayout, ZAllocError, + }; + pub use zenoh_shm::api::slice::{ + zsliceshm::{zsliceshm, ZSliceShm}, + zsliceshmmut::{zsliceshmmut, ZSliceShmMut}, }; } diff --git a/zenoh/src/prelude.rs b/zenoh/src/prelude.rs index 17286ddeea..ac60f16c89 100644 --- a/zenoh/src/prelude.rs +++ b/zenoh/src/prelude.rs @@ -51,7 +51,7 @@ pub(crate) mod flat { pub use crate::scouting::*; pub use crate::selector::*; pub use crate::session::*; - #[cfg(feature = "shared-memory")] + #[cfg(all(feature = "unstable", feature = "shared-memory"))] pub use crate::shm::*; pub use crate::subscriber::*; pub use crate::time::*; @@ -74,7 +74,7 @@ pub(crate) mod mods { pub use crate::scouting; pub use crate::selector; pub use crate::session; - #[cfg(feature = "shared-memory")] + #[cfg(all(feature = "unstable", feature = "shared-memory"))] pub use crate::shm; pub use crate::subscriber; pub use crate::time;