Skip to content

feat!: remove simple_doip's old client, server and bare-metal entity, with the migration guide and 0.7.0 changelogs (W13) - #63

Merged
zheylmun merged 13 commits into
mainfrom
feat/remove-old-doip
Oct 12, 2026
Merged

zheylmun merged 13 commits into
mainfrom
feat/remove-old-doip

Conversation

@zheylmun

@zheylmun zheylmun commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Issue URL

Closes #25, closes #26, closes #33, closes #34, closes #48. Based on main after W9 (#62).

What this does

Removes simple_doip's three old I/O surfaces, which Tester, Entity and the uds_on_ip transports replace. It also writes the migration guide and every crate's 0.7.0 changelog. This is the breaking release; publishing stays held in ci.yml.

  • Removed:
    • The modules client, client_inner, the old connection, socket_manager, server, bare_metal_entity, and error, which only those modules used.
    • The client and server features, and the async-trait and futures dependencies.
    • impl Default for OwnedMessage, which only the old client used.
    • The tests integration_test, tester_interop and udp_identification, and the examples simple_client and echo_server.
    • bare_metal_entity was not feature-gated, so its removal breaks default-feature users.
  • Ported first: every behaviour that only the old tests covered now has a test on the new code. The UDP ports keep the old tests' bytes:
    • A request for another entity's EID or VIN gets silence, and the entity still answers the next request.
    • A truncated datagram gets nothing, and a UDP alive check gets NACK 0x01 (the old test expected silence). Neither stops the next answer.
    • Connections that close without sending anything free their sockets.
    • What arrived before the entity closed is reported before Closed.
    • An acknowledgement late in the 2 s window still confirms Ok.
    • Routing activation passes over unrelated messages.
    • A response that arrives before its acknowledgement is still indicated.
  • Kept: the codec feature and MessageCodec. tests/entity_interop.rs and a fuzz target use them; the fuzz crate now needs only codec. tokio is a dev-dependency only: codec no longer enables it, and tracing-subscriber is gone from the crate and the workspace, both from the review.
  • Docs:
    • simple_doip/ARCHITECTURE.md drops the old modules' sections, including §2.5.2 ("What the old code did"), and is renumbered.
    • In uds_on_ip/ARCHITECTURE.md, the "two server seams" prerequisite is resolved and invariant 2 now holds.
    • The READMEs describe Tester and Entity.
  • crates/simple_doip/MIGRATING.md: maps Client → Tester (and uds_client! over DoIpClientTransport), Server → Entity with with_discovery (and uds_server! over DoIpTransport), and bare_metal_entity → Entity on an edge-nal adapter.
    • The bare_metal_entity section is written for a firmware that drove it from its network stack's callbacks. It says what such a firmware must now supply and what changes on the wire.
    • The whole guide is compiled, as testing/doip-loopback's doctests: the Tester and Entity examples, the uds_client! and uds_server! ones over uds_on_ip, and the embassy-net one over the adapter. The loopback crate is where every crate the guide reaches can be a dev-dependency; from the review.
  • Changelogs (under [Unreleased], version 0.7.0):
    • simple_doip covers everything since 0.6.0 and uds_protocol everything since 0.1.0; both were checked with cargo semver-checks against the published versions.
    • uds_session, uds_services and uds_on_ip get first-release entries.

The embedded probe's size is unchanged, since the probe never linked the old code.

Issues

Notes for review

  • Halo's rust_doip_shim depends on the separate luminartech/simple_doip repo at tag v0.1.0, not on this workspace, so this PR cannot break its build. Halo is not changed.
  • The codec, alloc and std layers are now used only by one test and the fuzz crate. Moving MessageCodec behind a test-only feature was deferred. Doing it after 0.7.0 would take another breaking release.
  • ci.yml:227: a one-word comment edit (it no longer names tester_interop).

Testing

  • just check-all: fmt, the tests, clippy -D warnings, the embedded build and size gate, and rustdoc, rerun after the rebase onto feat!: the DoIP client transport, a uds_client! client over a Tester end to end (W9) #62 and the review changes.
  • just miri: 1,278 tests, including the tree-borrows run of the connection tests.
  • cargo +1.91 check --workspace --all-features --all-targets
  • The quality gate with pedantic clippy, the feature powerset (38 combinations) and -D missing_docs, all clean.
  • /code-review and the Rust design review; their findings are fixed in the last two commits.

🤖 Generated with Claude Code

@zheylmun
zheylmun added this pull request to stack #64 October 9, 2026 21:59
@JustinKovacich
JustinKovacich self-requested a review October 12, 2026 14:24

@JustinKovacich JustinKovacich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with optional comments.

Comment thread crates/simple_doip/CHANGELOG.md Outdated
Comment thread crates/simple_doip/Cargo.toml Outdated
Comment thread crates/simple_doip/Cargo.toml
Comment thread crates/simple_doip/CHANGELOG.md
Comment thread crates/simple_doip/src/lib.rs Outdated
Base automatically changed from feat/doip-client-transport to main October 12, 2026 16:55
…and server's tests did

Ported before the old surfaces are deleted:
- entity_udp: a request for another entity's EID or VIN gets silence and the next
  request is answered (Figure 13), and a truncated datagram or a UDP alive check
  (NACK 0x01, Figure 16; the old test expected silence) does not stop the next.
- entity: connections that close without a frame free their sockets (REQ 4.DoIP-002).
- tester: what arrived before the entity's close is reported before Closed
  (ISO 14229-5:2022 REQ 7.9); an ack late in A_DoIP_Diagnostic_Message confirms Ok;
  routing activation passes over other well-formed messages.

Tester::connect's rustdoc said any answer but a response for the tester is an error;
it now says what it does: an alive check is answered and other messages passed over.
tester::Tester, entity::Entity (with Entity::with_discovery for UDP) and
uds_on_ip's transports replace them. Removed:
- the modules client, client_inner, connection (the old one), socket_manager,
  server and bare_metal_entity, and error, which only they used;
- the `client` and `server` features, and async-trait and futures, which
  nothing else depends on;
- impl Default for OwnedMessage, a placeholder only client_inner used;
- tests integration_test, tester_interop and udp_identification, and the
  examples simple_client and echo_server. The behaviours only those tests
  pinned were ported to Tester and Entity first.

The fuzz crate needs only `codec`. lib.rs's derogation counts are re-measured:
13 production sites (was 29), 125 test-module sites (the 49 was already stale).
ci.yml's Miri comment stops naming tester_interop.

BREAKING CHANGE: bare_metal_entity was not feature-gated, so every user of
simple_doip, default features included, loses it. simple_doip::Error, the
client and server features and their modules are gone.
…and bare-metal entity

ARCHITECTURE.md loses the old modules' layering rows, feature gating, module map,
pending-request lifecycle, error type and tests, and §2.5.2 ("What the old code
did"); §2.5 and §7 are renumbered, and every cross-reference with them. §7.2's
write-only fields were all in deleted code, and §7's server rough edges go.
The two sentences that named W9's outbound_max now name
DoIpClientTransport::with_max_data_size. §4 describes MessageError alone, and why
it carries std::io::Error (MessageCodec's Decoder needs it).

The README's scope, feature table and examples describe Tester and Entity, and
point at tests/entity_std.rs, testing/doip-loopback and the embassy-net example
in place of the deleted example pair. The workspace README's simple_doip row
drops the async client and server.
…ariant 2 holds

§3.1's "does not hold today", §9.1's "two server seams" prerequisite and
invariant 2's "currently violated" all named simple_doip's bare_metal_entity
and its on_uds_request callback, which is deleted. uds_services is now the one
place a request is answered.
…ment is indicated

The old client dropped such a response, and its README said so. The Tester
indicates every diagnostic message when it arrives (ISO 13400-2:2019 8.3.3); the
migration guide states it, so a test pins it.
…-metal entity

MIGRATING.md maps each removed type to its replacement, with an example for each:
Client to Tester, and to a uds_client! client over DoIpClientTransport; Server to
Entity with with_discovery, and to a uds_server! server over DoIpTransport; and
bare_metal_entity to Entity on an edge-nal adapter, written for a firmware that
drove it from its network stack's callbacks, with what such a firmware must
supply and what changes on the wire.

The guide is a doctest of simple_doip under the connection feature, so its
Tester and Entity examples compile against the crate. The uds_on_ip and
embassy-net examples cannot (neither crate is a simple_doip dependency), so each
names the tested file it is taken from.
…wn breaks

Each crate's CHANGELOG.md gets its 0.7.0 entry under [Unreleased]:
- simple_doip: everything since 0.6.0, from cargo semver-checks against the
  published 0.6.0 and the commits since. bare_metal_entity's removal comes
  first: it was not feature-gated, so it breaks default-feature users. Then the
  client and server, the connection feature's service traits, Tester and
  Entity, discovery, and the protocol core's own breaks.
- uds_protocol: everything since 0.1.0, also checked with semver-checks; the
  jump to 0.7.0 is the lockstep release.
- uds_session, uds_services, uds_on_ip: first-release entries describing each
  crate as released, with its known limitations.

MIGRATING.md said the protocol core was unchanged but for OwnedMessage's
Default; it has breaks of its own since 0.6.0, which the changelog lists.
…gation counts

The UDP test that a datagram the entity cannot serve does not stop the next
cited REQ 7.DoIP-031, which is about broadcast source addresses; it rests on
7.DoIP-042 and Figure 16. The test that a response before its acknowledgement
is indicated cited 8.3.3, which defines the indication and says nothing of
its order; it pins Tester's own contract, and now says so.

lib.rs and ARCHITECTURE §7.3 counted the lint derogations' sites. Nothing
checked the numbers, and the test-module count had already drifted; the
allow on each module is the list.
… prose is rewrapped

Tester::connect said, under Cancel safety, that any other well-formed message is
passed over while it waits. A header NACK and a response for another tester are
well formed and end connect with an error, as its # Errors section says. The
description now names what is passed over: a message that is neither a routing
activation response nor a header negative acknowledgement. The test that pins
it says the same.

ARCHITECTURE.md's pointer to the entity's known issues still named §7.4, which is
§7.3 since §7.2 went. The paragraphs this branch edited in ARCHITECTURE.md and
the README are rewrapped, the guide's embassy-net loop is formatted, and the new
late-ack test cites Table 12 bare, as the crate's own document.
@zheylmun
zheylmun force-pushed the feat/remove-old-doip branch from 69b3afe to 1578d1e Compare October 12, 2026 16:55
…iber is gone

`MessageCodec` needs `tokio-util` and `bytes`; the only tokio left in the
crate is its tests', which the dev-dependency gives. Enabling `codec` built
a runtime for no caller. `tracing-subscriber` had no user left once the
old client, server and their tests went, so it leaves the crate and the
workspace.
…refusal a connection gives

"`automotive-wire-codec` 0.4, and `embedded-io` is gone" could be read as
both going. And a closed connection refuses `ConnectionRefusal::Closed`
since #62, which the changelog and one test's doc still called
`NotConnected`.
It gave simple_doip's `client` and `server` features, which required
`codec`, `std` and tokio, as why an executor is assumed below. Those are
gone, and `uds_on_ip` never had such features: what is below is
`connection`, async over edge-nal and embassy-time, with no runtime of its
own.
Three of the guide's five examples were `ignore`d: the `uds_client!` and
`uds_server!` ones reach `uds_on_ip` and `uds_services`, and the
embassy-net one the adapter, none of which `simple_doip` can have as a
dev-dependency. The loopback crate can, and is unpublished for exactly
this, so the guide is its doctest now, every example compiled, and the
`simple_doip` hook that compiled two of them goes.
@zheylmun
zheylmun force-pushed the feat/remove-old-doip branch from 8ef0211 to 98680be Compare October 12, 2026 17:03
@zheylmun
zheylmun merged commit 49fda8a into main Oct 12, 2026
28 of 29 checks passed
@zheylmun
zheylmun deleted the feat/remove-old-doip branch October 12, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment