Skip to content
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
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Changelog

## [0.13.0]

Contains a breaking change to a public enum, so this release takes the major
position under this crate's 0.x convention. As in 0.12.0, the `version` in
`Cargo.toml` is bumped here rather than left to release-plz so that
`cargo-semver-checks` compares against the version this change actually lands as.

### Breaking — `E2ECheckStatus` reports the real validation error

The E2E Profile 4 and Profile 5 algorithms now come from the `simple-e2e`
crate; this crate keeps only the SOME/IP-specific glue (the registry, `E2EKey`,
`E2EProfile`, and the return-code mapping). The visible consequence is that a
rejected message tells you *why*:

```rust
// Before — two tags, no detail. A downstream logger wanting the CRC values
// had to fabricate them.
E2ECheckStatus::CrcError
E2ECheckStatus::BadArgument

// After — the profile's own error, with the received and computed values.
E2ECheckStatus::Invalid(E2EValidateError::Profile5(
profile5::ValidateError::CrcMismatch { got: 0x1A2B, expected: 0x1A2C },
))
E2ECheckStatus::Invalid(E2EValidateError::Profile4(
profile4::ValidateError::DataIdMismatch { got: .., expected: .. },
))
```

`E2ECheckStatus::to_return_code` (and `sd_codec::e2e_status_code`) are
unchanged on the wire: a CRC mismatch is still `2`, every other validation
failure is still `6`. `E2EValidateError::is_crc_mismatch` is the predicate
behind that split. `E2EValidateError` is `#[non_exhaustive]`, `Copy`, and
implements `Display` through the inner error.

Migration for a `match` on `E2ECheckStatus`:

| 0.12 | 0.13 |
|---|---|
| `CrcError` | `Invalid(e) if e.is_crc_mismatch()` |
| `BadArgument` | `Invalid(_)` (after the CRC arm) |
| `CrcError \| BadArgument` | `Invalid(_)` |

Everything else in `e2e` keeps its name. `Profile4Config`, `Profile5Config`,
`Profile4State`, `Profile5State` are now type aliases of
`simple_e2e::profile{4,5}::{Config, State}`; `PROFILE4_HEADER_SIZE` /
`PROFILE5_HEADER_SIZE` alias the profile modules' `HEADER_SIZE`; and the six
`check_*` / `protect_*` functions are thin adapters that still return
`E2ECheckResult` / `e2e::Error`. `E2ECheckResult::counter` stays `Option<u32>`.
The direct `crc` dependency is gone (it arrives through `simple-e2e`).

### Removed

- `E2ECheckStatus::CrcError`, `E2ECheckStatus::BadArgument` (see above).
- The crate-private CRC and profile modules and their unit tests, which
duplicated `simple-e2e`'s.

## [0.12.0]

Contains a breaking change to the public error enums, so this release takes the
Expand Down
12 changes: 10 additions & 2 deletions Cargo.lock

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

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ exclude = ["tools/size_probe"]

[package]
name = "simple-someip"
version = "0.12.0"
version = "0.13.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "A lightweight SOME/IP serialization and communication library"
repository = "https://github.com/luminartech/simple_someip"

[dependencies]
crc = "3.4"
# embassy-sync provides no_std-compatible bounded channels used as the
# channel backend when the `bare_metal` feature is active. The
# `critical-section` and `portable-atomic` deps ship with embassy-sync and
Expand Down Expand Up @@ -64,6 +63,9 @@ futures-util = { version = "0.3", default-features = false, features = [
"async-await-macro",
], optional = true }
heapless = "0.9"
# The E2E Profile 4 / Profile 5 algorithms. This crate keeps only the
# SOME/IP-specific glue (registry, key, profile selection, return codes).
simple-e2e = { version = "0.1", default-features = false }
socket2 = { version = "0.5", optional = true, features = ["all"] }
thiserror = { version = "2", default-features = false }
tokio = { version = "1", default-features = false, features = [
Expand Down Expand Up @@ -94,7 +96,7 @@ default = ["std"]
# tracing behind a feature so those builds can opt out; std users
# pick it up automatically through the `std` feature below.
tracing = ["dep:tracing"]
std = ["embedded-io/std", "thiserror/std", "tracing", "tracing/std", "_alloc"]
std = ["embedded-io/std", "thiserror/std", "tracing", "tracing/std", "_alloc", "simple-e2e/std"]
# Feature split: `client` exposes the protocol/trait-surface client
# (no tokio, no socket2); `client-tokio` layers the tokio + socket2
# convenience defaults on top. Consumers of the bare-metal trait surface
Expand Down Expand Up @@ -203,3 +205,6 @@ required-features = ["client", "server", "bare_metal"]

[[test]]
name = "buffer_pool"

[patch.crates-io]
simple-e2e = { path = "../simple_e2e" }
2 changes: 1 addition & 1 deletion simple-someip-embassy-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ readme = "README.md"
#

[dependencies]
simple-someip = { path = "..", version = "0.12", default-features = false, features = [
simple-someip = { path = "..", version = "0.13", default-features = false, features = [
"client",
"server",
"bare_metal",
Expand Down
55 changes: 0 additions & 55 deletions src/e2e/config.rs

This file was deleted.

Loading
Loading