| Crates.io | recentip |
| lib.rs | recentip |
| version | 0.1.0-alpha.1 |
| created_at | 2026-01-25 20:46:04.974561+00 |
| updated_at | 2026-01-25 20:46:04.974561+00 |
| description | An opinionated, type-safe, async SOME/IP implementation for Rust — boring by design, backed by Tokio. |
| homepage | |
| repository | https://github.com/daniel-freiermuth/recentip |
| max_upload_size | |
| id | 2069500 |
| size | 584,090 |
Warning! This is an alpha stage hobby project for exploration. The goal is to create a solid, easy-to-use and performant middleware implementation that is easily and fearlessly maintainable.
An opinionated type-safe, async, lock-free, no-unsafe, no-panic, boring SOME/IP protocol implementation backed by tokio.
SOME/IP (Scalable service-Oriented MiddlewarE over IP) is the standard middleware protocol for automotive Ethernet communication, enabling service-oriented communication between ECUs in modern vehicles.
Add to your Cargo.toml:
[dependencies]
recentip = "0.1"
📚 See the full examples in the documentation
The documentation includes compile-checked examples covering:
use recentip::prelude::*;
let someip = recentip::configure()
.preferred_transport(Transport::Tcp) // Prefer TCP when service offers both
.magic_cookies(true) // Enable Magic Cookies for debugging
.offer_ttl(3) // Service offer TTL in seconds
.start().await?;
| Type | Role | Pattern |
|---|---|---|
SomeIp |
Central coordinator, owns sockets | — |
OfferedService |
Client proxy to remote service | — |
ServiceOffering |
Server handle for offered service | — |
SubscriptionBuilder |
Build subscription to eventgroups | Builder pattern |
Subscription |
Receive events from eventgroups | — |
Responder |
Reply to incoming RPC request | Consumed on reply |
| Type | Valid Range | Notes |
|---|---|---|
ServiceId |
0x0001–0xFFFE | 0x0000 and 0xFFFF reserved |
InstanceId |
0x0001–0xFFFE or Any |
0xFFFF = wildcard |
MethodId |
0x0000–0x7FFF | Bit 15 = 0 for methods |
EventId |
0x8000–0xFFFE | Bit 15 = 1 for events |
EventgroupId |
0x0001–0xFFFE | Groups related events |
I haven't looked into this yet, but https://github.com/thoughtworks/smip looks like it would be great on top of this lib. https://rocket.rs/ -like annotations for SOME/IP.
The library comes with several test suites:
tests/compliance certifying compliance with the SOME/IP specs backedThe library uses turmoil for deterministic network simulation. Tests should be executed using nextest as it is configured to honor a subset of tests that needs to be executed sequentially. We aim for 100% code coverage.
# Run most tests (~10s)
cargo nextest run
# Run all tests (~40s)
cargo nextest run --features slow-tests
# Run with coverage
cargo llvm-cov nextest --features slow-tests
# Doc tests only
cargo test --doc
For compile-time checking, use the included dylint lint crate:
# Install dylint
cargo install cargo-dylint dylint-link
# Run lints
cargo dylint --all
The RUNTIME_MUST_SHUTDOWN lint warns when a SomeIp might be dropped without shutdown().
This implementation targets compliance with the SOME/IP specification.
Test coverage is tracked in spec-data/coverage.json with compliance tests in tests/compliance/.
We aim for 100% coverage of the open SOME/IP 2025-12 specs.
┌─────────────────────────────────────────────────────────────┐
│ User Application │
│ OfferedService ServiceOffering SomeIpBuilder │
└──────────┬─────────────────┬─────────────────────┬──────────┘
│ Commands │ Commands │ configure()
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────┐
│ SomeIp (Event Loop) │
│ RuntimeState: offered, discovered, pending_calls, etc. │
│ select! over: commands, SD socket, RPC socket, TCP, timer │
└─────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ SD Socket │ │ RPC Socket │
│ UDP:30490 │ │ UDP/TCP │
└─────────────┘ └─────────────┘
SOME/IP is designed for automotive ECUs where runtime predictability matters. This section documents the library's behavior for systems with timing requirements.
⚠️ This library is NOT ASIL-qualified and NOT suitable for safety-critical functions.
| Aspect | Status | Notes |
|---|---|---|
| Throughput | Untested | No benchmarks yet; contributions welcome |
| Latency bounds | ❌ Unbounded | Tokio provides no worst-case guarantees |
| Jitter | ❌ Variable | Work-stealing scheduler, GC-free but not deterministic |
| Zero-copy | ❌ Not yet | Message parsing allocates; zero-copy design possible |
This library uses Tokio as its async runtime. Key characteristics relevant to timing (see Tokio runtime docs):
Bounded delay guarantee (from Tokio docs):
Under the following two assumptions:
- There is some number
MAX_TASKSsuch that the total number of tasks never exceedsMAX_TASKS.- There is some number
MAX_SCHEDULEsuch that callingpollon any task returns withinMAX_SCHEDULEtime units.Then, there is some number
MAX_DELAYsuch that when a task is woken, it will be scheduled withinMAX_DELAYtime units.
Additional runtime characteristics:
event_interval)global_queue_interval)What this means for SOME/IP:
While recentIP is right now using Tokio, it was written with other async runtimes and mind and can be ported or made agnostic with medium effort.
This library is not suitable for hard real-time applications:
| Concern | Status | Notes |
|---|---|---|
| Heap allocation | ⚠️ Dynamic | Allocates during operation (buffers, connections) |
| Async runtime | ⚠️ Tokio | Work-stealing scheduler, not deterministic |
| Blocking | ⚠️ Possible | Async mutex in TCP connection pool |
| Panic paths | ⚠️ Minimal | 3 unwraps in runtime code (will be eliminated) |
| Unsafe code | ✅ Forbidden | #![forbid(unsafe_code)] enforced |
| Priority inversion | ⚠️ Possible | No priority-aware scheduling |
This library uses async Rust for efficient I/O multiplexing — waiting on multiple sockets, timers, and channels without threads or manual state machines. Async itself compiles to state machines, but the Tokio runtime is probably not ASIL-certifiable. However, recentIP is well-suited for QM (Quality Management) domains, which covers the majority of SOME/IP deployments: infotainment, telematics, diagnostics, logging, and service orchestration.
For safety-critical or hard real-time deployments, consider:
net module is abstracted; could support embassy for embeddedContributions toward these goals are welcome. See DESIGN.md for architecture details.
This library uses Tokio, which is designed for high-throughput servers, not real-time systems. For hard real-time requirements, consider these Rust ecosystems:
| Project | Model | Notes |
|---|---|---|
| RTIC | Interrupt-driven, priority-based | Ideal for bare-metal MCUs with hardware priorities |
| Embassy | Async, no_std, embedded |
Could be a backend for this library's net abstraction |
| Drone OS | Async, preemptive threads | RTOS with async/await, Cortex-M focus |
| Hubris | IPC-based microkernel | Oxide's secure embedded OS |
| Tock | Process isolation, embedded | Security-focused embedded OS |
| Project | Rust Support | Notes |
|---|---|---|
| FreeRTOS | freertos-rust |
Industry standard, 40+ architectures, AWS-maintained |
| RIOT | riot-wrappers |
IoT-focused, threading, network stacks, 8/16/32-bit |
| Project | Model | Notes |
|---|---|---|
| OxidOS | Tock-based, sandboxed apps | Automotive ASIL targeting, RISC-V ready, ST Stellar MCUs |
| Veecle OS | Actor-based, OSAL abstraction | Supports std/Embassy/FreeRTOS backends; SOME/IP support built-in based on vsomeip |
| veecle-pxros | PXROS-HR runtime | AURIX platform, ASIL-D certified kernel, Infineon/HighTec ecosystem |
| Project | Rust Support | Notes |
|---|---|---|
| ROS 2 | ros2_rust |
Pub/sub, services, zero-copy; used in ADAS/autonomous driving |
| Project | Rust Support | Notes |
|---|---|---|
| Red Hat In-Vehicle OS | Full Rust toolchain | RHEL-based, ASIL-B (ISO 26262); VW, Audi |
| Automotive Grade Linux | Full Rust toolchain | Linux Foundation; Toyota, Honda, Mazda, Subaru, Suzuki, Mercedes-Benz |
Potential integration paths:
wire) and state machine logic; replace Tokio I/O with platform-specific driversveecle-os-data-support-someip; could potentially share wire-format codeCurrently, no Rust SOME/IP implementation targets no_std or real-time runtimes. This represents an opportunity for the ecosystem.
Implementation + unit tests
❯ tokei src/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rust 28 9209 7428 683 1098
|- Markdown 28 3210 25 2515 670
(Total) 12419 7453 3198 1768
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 28 12419 7453 3198 1768
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Integration tests
❯ tokei tests/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rust 46 41453 31391 3903 6159
|- Markdown 44 2017 0 1619 398
(Total) 43470 31391 5522 6557
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 46 43470 31391 5522 6557
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vsomeip as comparison
❯ tokei vsomeip/implementation/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Autoconf 1 196 23 117 56
C++ 138 46169 36852 2496 6821
C++ Header 189 13799 8802 1341 3656
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 328 60164 45677 3954 10533
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❯ tokei vsomeip/test/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Files Lines Code Comments Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Autoconf 321 18553 16231 1430 892
CMake 59 3821 2549 703 569
C++ 175 39092 29506 3306 6280
C++ Header 104 6735 3861 1607 1267
JSON 12 4654 4654 0 0
PlantUML 38 1696 1083 0 613
Python 3 131 95 8 28
Plain Text 3 749 0 610 139
─────────────────────────────────────────────────────────────────────────────────
Markdown 28 1419 0 982 437
|- BASH 1 15 15 0 0
|- C++ 1 43 21 14 8
(Total) 1477 36 996 445
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total 743 76908 58015 8660 10233
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This project is licensed under the GPL-3.0 License.
Contributions are welcome!
Make sure the following is fulfilled when filing a MR:
tests/. Annotate if this is covering a spec.