eclipse-iceoryx / iceoryx-rs

Rust wrapper for Eclipse iceoryx™ - true zero-copy inter-process-communication
Apache License 2.0
86 stars 16 forks source link

Create an untyped API that works on [u8] slices #36

Closed elBoberido closed 1 year ago

elBoberido commented 2 years ago

Brief feature description

Create an untyped API that works on [u8] slices.

Detailed information

Add allocates method to the publisher impl like

pub fn allocate(length: usize) -> SampleMut<[u8]> {}

pub fn allocate_aligned(length: usize, alignment: usize) -> SampleMut<[u8]> {}

The subscriber shall also be able to work with slices.

This should enable us to expose &mut [u8] and have a nice compatibility with the bytes::BufMut trait from the bytes crate

elBoberido commented 2 years ago

@neilisaac this will not be part of v0.1 but I plan to have this as soon as possible in v0.2