Rust wrapper for Eclipse iceoryx™ - true zero-copy inter-process-communication

Overview

iceoryx-rs

Experimental rust wrapper for the iceoryx IPC middleware.

clone and build

The iceoryx repo is include as git submodule, therefore keep in mind to checkout with the --recursive option.

git clone https://github.com/elBoberido/iceoryx-rs.git --recursive

To build the examples run

cargo build --all --examples

run the examples

Open three terminals

  • start RouDi target/iceoryx-install/bin/iox-roudi
  • start the publisher target/debug/examples/publisher_simple
  • start a subscriber target/debug/examples/subscriber_simple
Comments
  • Add a reference-counted version of `SampleMut`

    Add a reference-counted version of `SampleMut`

    Allows to create owned samples when the publisher is reference-counted.

    Note: This is only a first draft to request feedback. I'm happy to polish this PR if this change is desired.

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [ ] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [ ] Commits messages are according to this guideline
    4. [ ] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [ ] Relevant issues are linked
    6. [ ] Add sensible notes for the reviewer
    7. [ ] All checks have passed (except task-list-completed)
    8. [ ] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes TBD
    enhancement 
    opened by phil-opp 13
  • iox-#17: Fix cargo build

    iox-#17: Fix cargo build

    Fixes #17

    The build issue is not related to libacl1-dev.

    The problem actually seems to be that the current make_and_install() function is not dealing with the cpptoml dependency of iceoryx_posh correctly.

    This in turn leads to a failure with the cmake configuration of iceoryx_posh. You can check this by inspecting the ./target/iceoryx-install/include/* folders. Basically the iceoryx_posh include folder is missing, leading to the error message referenced in the issue.

    The PR essentially just mimics the recommended way to build iceoryx itself. Admittedly this is not ideal in terms of minimal compilation. On the other hand, it seems to work reliably. Please, feel free to optimize!

    I have also taken the liberty to bump ICEORYX_VERSION to v2.0.2.

    Pre-Review Checklist for the PR Author

    1. [x ] Code follows the Rust coding style and is formatted with rustfmt
    2. [x ] Branch follows the naming format (iox-#123-this-is-a-branch)
    3. [ ] Commits messages are according to this guideline
    4. [x ] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x ] Relevant issues are linked
    6. [x ] Add sensible notes for the reviewer
    7. [x ] All checks have passed (except task-list-completed)
    8. [ x] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes TBD
    bugfix 
    opened by adoerr 5
  • Use `MaybeUninit` for newly allocated samples

    Use `MaybeUninit` for newly allocated samples

    Since the data of the samples is not initialized, this should be reflected by the type system with MaybeUninit. The user then either has to use assume_init before sending the sample or it might be done under the hood. Alternatively MaybeUninit<T> could be transmuted to T.

    enhancement 
    opened by elBoberido 5
  • Early abort on iceoryx build failure

    Early abort on iceoryx build failure

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-#123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [x] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [x] Commits are properly organized and messages are according to the guideline
    • [x] Code according to our coding style and naming conventions
    • [x] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [x] All open points are addressed and tracked via issues

    References

    • Closes #17
    bugfix 
    opened by elBoberido 4
  • iox-roudi C++ sdk

    iox-roudi C++ sdk

    Brief feature description

    Our service uses iox-roudi when communicating with cyclonedds shm.

    Since cyclonedds depends on the iox-roudi service, we have to start the iox-roudi service before running our own C++ service.

    Is there any sdk way to integrate iox-roudi in our C++ system?

    opened by YeahhhhLi 2
  • Iox 36 untyped api

    Iox 36 untyped api

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [x] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes #36
    opened by elBoberido 2
  • Iox 10 prepare crates.io release

    Iox 10 prepare crates.io release

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [x] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Relates to #10
    opened by elBoberido 2
  • Iox 27 rename pod marker to shm send

    Iox 27 rename pod marker to shm send

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [x] Assign PR to reviewer

    This PR renames the POD marker trait to ShmSend since it fulfills a similar purpose to Send but instead to mark data types to be transferred across thread boundaries it marks data types to be transferred across process boundaries.

    Furthermore, there are additional impls for ShmSend.

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes #27
    refactoring 
    opened by elBoberido 2
  • iox-23 refine and update publisher and subscriber api

    iox-23 refine and update publisher and subscriber api

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-#123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [x] Assign PR to reviewer

    Notes for Reviewer

    This PR refines and updates the API to match the iceoryx v2 functionality.

    The PR should be merged after #22

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes #23
    refactoring 
    opened by elBoberido 2
  • Iox 4 document public api

    Iox 4 document public api

    Pre-Review Checklist for the PR Author

    1. [x] Code follows the Rust coding style and is formatted with rustfmt
    2. [x] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [x] Commits messages are according to this guideline
    4. [x] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [x] Relevant issues are linked
    6. [x] Add sensible notes for the reviewer
    7. [x] All checks have passed (except task-list-completed)
    8. [ ] Assign PR to reviewer

    Notes for Reviewer

    This is based on #36 which needs to be merged first.

    All the public API should now be documented and the documentation is enforced for writing new public API.

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes #4
    opened by elBoberido 1
  • [test] iox-#53 dummy

    [test] iox-#53 dummy

    Pre-Review Checklist for the PR Author

    1. [ ] Code follows the Rust coding style and is formatted with rustfmt
    2. [ ] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [ ] Commits messages are according to this guideline
    4. [ ] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [ ] Relevant issues are linked
    6. [ ] Add sensible notes for the reviewer
    7. [ ] All checks have passed (except task-list-completed)
    8. [ ] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Closes TBD
    opened by elBoberido 1
  • Non-uniform type representation in shared memory data

    Non-uniform type representation in shared memory data

    Required information

    According to: https://doc.rust-lang.org/nomicon/repr-rust.html

    There is no indirection for these types; all data is stored within the struct, as you would expect in C. 
    However with the exception of arrays (which are densely packed and in-order), the layout of data is 
    not specified by default.
    

    Translated it means, when I have a struct:

    struct A {
        a: u8,
        b: u32,
        c: u16,
    }
    

    The memory representation can look like:

    struct A { // version 1 
        a: u8,
        _pad1: [u8; 3], // to align `b`
        b: u32,
        c: u16,
        _pad2: [u8; 2], // to make overall size multiple of 4
    }
    

    or for instance like this:

    struct A { // version 2
        b: u32,
        c: u16,
        a: u8,
        _pad: u8,
    }
    

    Therefore, we require #[repr(C)] for interoperability with C - which is already done in the Counter type in the example.

    But I think this is also a hard requirement for communication between rust only apps. Otherwise it is possible that one app uses version 1 of A and the other one is using version 2?!

    Could a possible solution to this problem be a custom trait (which already exists under the name ShmSend) in combination with a custom derive? This also could be a very ugly problem for the untyped rust api when one acquires memory and writes the custom type later in it.

    opened by elfenpiff 1
  • iox-#64 Use raw sample for sys crate

    iox-#64 Use raw sample for sys crate

    Pre-Review Checklist for the PR Author

    1. [ ] Code follows the Rust coding style and is formatted with rustfmt
    2. [ ] Branch follows the naming format (iox-123-this-is-a-branch)
    3. [ ] Commits messages are according to this guideline
    4. [ ] Update the PR title
      • Follow the same conventions as for commit messages
      • Link to the relevant issue
    5. [ ] Relevant issues are linked
    6. [ ] Add sensible notes for the reviewer
    7. [ ] All checks have passed (except task-list-completed)
    8. [ ] Assign PR to reviewer

    Notes for Reviewer

    Checklist for the PR Reviewer

    • [ ] Commits are properly organized and messages are according to the guideline
    • [ ] Code according to our coding style and naming conventions
    • [ ] PR title describes the changes

    Post-review Checklist for the PR Author

    1. [ ] All open points are addressed and tracked via issues

    References

    • Relates to #64
    opened by elBoberido 0
  • Fallible version of `Runtime::init` function

    Fallible version of `Runtime::init` function

    Right now the only way to initialize a Runtime is through the init function. This function blocks until it establishes a connection to the RouDi daemon, or terminates the whole process on a timeout. This is not desired for robust applications, so it would be good to also have a try_init(app_name) -> Result function that just returns an error in this case. Ideally, the wait timeout would also be configurable.

    opened by phil-opp 1
  • publish new version crate

    publish new version crate

    would be nice if you guys could publish a new release crate with a version bump. i tried running the examples in the dir and they don't compile on 0.1.0, i had to check out the version from latest master branch. thanks

    opened by tdudz 2
  • Support iceoryx builtin types

    Support iceoryx builtin types

    Brief feature description

    iceoryx builtin types like iox::cxx::string and iox::cxx::vector should be supported

    Detailed information

    The idea is to have something similar to this https://docs.rs/cxx/latest/cxx/#builtin-types

    So there would be a CxxString, IoxString or IoxCxxString which would have the same layout as the C++ counterpart. What makes things interesting is the template argument but that should also be solvable.

    We would have to be really carefully with this and need to adapt the types when the ABI of the C++ counterpart changes.

    enhancement 
    opened by elBoberido 1
Releases(v0.1.0)
Owner
null
Elkodon - true zero-copy inter-process-communication in rust

elkodon - Zero-Copy Lock-Free IPC Purely Written In Rust Introduction Performance Getting Started Publish Subscribe Events Custom Configuration Suppor

null 12 Nov 27, 2023
A simple configuration-based module for inter-network RPC in Holochain hApps.

DNA Auth Resolver A simple configuration-based module for inter-network RPC in Holochain hApps. About Usage In the origin zome In the destination DNA

Shadman Baig 0 Feb 4, 2022
The true next-gen L7 minecraft proxy and load balancer. Built in Rust.

Lure The true next-gen L7 minecraft proxy and load balancer. Built in Rust, Tokio and Valence. Why? Rust is a powerful programming language and a grea

Sammwy 67 Apr 16, 2023
Altruistic Angelshark is a project devoted to making Communication Manager (ACM) automation easier.

This project makes automating over one or more Communication Managers easier via OSSI over SSH.

ADP, LLC. 3 Feb 13, 2022
Druid Exporter plays a fundamental role as a receiver of metrics events coming from Druid clusters, adopting the HTTP format as a means of communication

Druid Exporter plays a fundamental role as a receiver of metrics events coming from Druid clusters, adopting the HTTP format as a means of communication. In addition to this capability, its primary function is to export these metrics to Prometheus, thus allowing the creation of meaningful graphs and visualizations.

Kiwfy 3 Sep 21, 2023
Druid Exporter plays a fundamental role as a receiver of metrics events coming from Druid clusters, adopting the HTTP format as a means of communication.

Druid Exporter plays a fundamental role as a receiver of metrics events coming from Druid clusters, adopting the HTTP format as a means of communication. In addition to this capability, its primary function is to export these metrics to Prometheus, thus allowing the creation of meaningful graphs and visualizations.

Not Empty Free Software Foundation 5 Oct 24, 2023
A copy of ziad87 "very stupid thing" (rip). Now in v2: Electric Boogaloo

IPv6-Place-v2 A re-implementation of ziad87's awesome "Place: IPv6" site. Written in Rust with Axum using Server-Sent-Events for the fun instead of WS

Server Scanning Inc. 4 Jun 6, 2023
⏱ Cross-platform Prometheus style process metrics collector of metrics crate

⏱ metrics-process This crate provides Prometheus style process metrics collector of metrics crate for Linux, macOS, and Windows. Collector code is man

Alisue 12 Dec 16, 2022
DHCP Server programmed in rust with zero dependencies and unsafe.

RustyDHCP A simple and zero-dependency DHCP server written in Rust, with credit to Richard Warburton for contributions to parts of the code. Features

null 53 Nov 6, 2023
Drop-in proxy for Discord gateway connections and sessions allowing for zero downtime deploys

gateway-proxy This is a very hacky project, so it might stop working if Discord changes their API core. This is unlikely, but keep that in mind while

Jens Reidel 39 Nov 26, 2022
Zero-Trust Decentralized Package Network

Zero-Trust Decentralized Package Network Current Development Phase ?? We are looking for your feedback! This project is currently in the "sandbox" ??️

Pyrsia 240 Jan 3, 2023
Easy-to-use wrapper for WebRTC DataChannels peer-to-peer connections written in Rust and compiling to WASM.

Easy-to-use wrapper for WebRTC DataChannels peer-to-peer connections written in Rust and compiling to WASM.

null 58 Dec 11, 2022
A super minimal wrapper around unix sockets for IPC on top of tokio.

tokio-unix-ipc This crate implements a minimal abstraction over UNIX domain sockets for the purpose of IPC on top of tokio.

Armin Ronacher 26 Nov 18, 2022
A wrapper for the Google Cloud DNS API

cloud-dns is a crate providing a client to interact with Google Cloud DNS v1

Embark 5 May 24, 2022
An HTTP server wrapper for omnisette. Supports both V1 (Provision) and V3 of anisette servers.

omnisette-server An HTTP server wrapper for omnisette. Supports both V1 (Provision) and V3 of anisette servers. Setup First, download the Apple Music

SideStore Team 5 Mar 29, 2023
Grow Rust is a Growtopia Private Server made in Rust

Grow Rust is a Growtopia Private Server made in Rust

null 14 Dec 7, 2022
Multiplex server for rust-analyzer, allows multiple LSP clients (editor windows) to share a single rust-analyzer instance per cargo workspace

ra-multiplex   Multiplex server for rust-analyzer, allows multiple LSP clients (editor windows) to share a single rust-analyzer instance per cargo wor

max 95 Dec 29, 2022
DNS Server written in Rust for fun, see https://dev.to/xfbs/writing-a-dns-server-in-rust-1gpn

DNS Fun Ever wondered how you can write a DNS server in Rust? No? Well, too bad, I'm telling you anyways. But don't worry, this is going to be a fun o

Patrick Elsen 26 Jan 13, 2023
Rust crate for configurable parallel web crawling, designed to crawl for content

url-crawler A configurable parallel web crawler, designed to crawl a website for content. Changelog Docs.rs Example extern crate url_crawler; use std:

Pop!_OS 56 Aug 22, 2021