Skip to content
Merged
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
16 changes: 8 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'doip'",
"name": "Debug unit tests in library 'simple_doip'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "doip",
"name": "simple_doip",
"kind": "lib"
}
},
Expand All @@ -31,7 +31,7 @@
"args": [
"build",
"--example=simple_client",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "simple_client",
Expand All @@ -50,7 +50,7 @@
"test",
"--no-run",
"--example=simple_client",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "simple_client",
Expand All @@ -68,7 +68,7 @@
"args": [
"build",
"--example=echo_server",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "echo_server",
Expand All @@ -87,7 +87,7 @@
"test",
"--no-run",
"--example=echo_server",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "echo_server",
Expand All @@ -106,7 +106,7 @@
"test",
"--no-run",
"--test=integration_test",
"--package=doip"
"--package=simple_doip"
],
"filter": {
"name": "integration_test",
Expand Down
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ returning `true` breaks it. Either delete the field or make the loop honor it.

### 7.6 Other rough edges

These are documented in `README.md` under **Status** and are repeated here only
as a pointer: no TLS; no unsolicited UDP vehicle announcement at power-on
The README's **Scope and limitations** section names these for an integrator
choosing the crate; the mechanics are here. No TLS; no unsolicited UDP vehicle announcement at power-on
(identification requests over UDP *are* answered, but only by
`Server::run_udp_responder` on a socket the caller binds and drives — `run_server`
binds TCP alone — and only the broadcast `0x0001` form, since `Payload::decode`
Expand Down
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/) (treating
`0.x` breaking changes as minor bumps, per the Cargo/SemVer convention for
pre-1.0 crates).

This file was reconstructed from the commit and pull-request history when the
crate was prepared for publication, so entries before that point describe what
changed rather than what was announced at the time.

## [Unreleased]

### Added

- `LICENSE-MIT` and `LICENSE-APACHE`. The manifest had declared
`MIT OR Apache-2.0` without carrying either text.
- `CHANGELOG.md`, `CONTRIBUTING.md`, `SECURITY.md`.
- `release-plz.toml`. Versioning, the changelog, tags, GitHub releases
and the crates.io publish are handled by release-plz through the
org-wide reusable workflow, matching `uds_protocol` and
`automotive_wire_codec`. There is no release workflow in this repo.

### Changed

- docs.rs now builds with all features, so the `client`, `server` and `codec`
API appears in the published documentation. `default = []`, so the default
build documents only the `no_std` core.
- `release-plz.toml` and `rust-toolchain.toml` are no longer packaged into
the published crate.

## [0.5.2] — 2026-09-03

### Fixed

- A failed connection reported `Error::SocketNotBound` instead of the
underlying connect error, so the reason a connection failed was discarded
and no log level revealed it.

## [0.5.1] — 2026-08-25

### Fixed

- A response already buffered by the client was dropped when the connection
closed, instead of being delivered to the caller waiting for it.

## [0.5.0] — 2026-08-25

### Changed

- **Breaking:** the diagnostic-message response timeout is configurable on
`ClientOptions`, and the client now waits `A_DoIP_Diagnostic_Message` for an
acknowledgement rather than the 50 ms figure ISO 13400-2 places on a DoIP
*entity*. The old value timed out on any peer that took longer than 50 ms to
acknowledge.

## [0.4.0] — 2026-08-19

### Changed

- **Breaking:** `ServerConnectionHandler::diagnostic_message` takes
`&mut dyn ResponseWriter` and returns `Result<(), Error>`. It previously
returned a single `OwnedMessage`, so a handler could emit either the
`DiagnosticMessageAck` or the functional response but not both — which is
what DoIP prescribes, and what a UDS tester waits for.

### Added

- `ResponseWriter`, so a handler can emit an acknowledgement, any number of
"response pending" messages, and a final answer, awaiting work between them.
- `Server::run_server_with_listener`, for injecting a bound `TcpListener`.
- `Server::run_udp_responder`, answering vehicle-identification requests over
UDP.

## [0.3.1] — 2026-08-12

### Changed

- A routing-activation denial is returned to the caller as an error instead of
only being logged.

## [0.3.0] — 2026-07-30

### Changed

- `MessageError` is built on the `automotive-wire-codec` error fragments, which
makes that crate's error taxonomy part of this crate's public API.

## [0.2.0] — 2026-07-30

### Changed

- **Breaking:** the protocol core is `no_std` and zero-copy. Messages borrow
from the receive buffer instead of allocating, `alloc` gates the owned
mirrors, and `std` and the async layers became opt-in Cargo features
(`default = []`).

## [0.1.0]

Initial implementation: DoIP message types, framing, and an async client and
server over tokio.

<!-- Only v0.1.0 and v0.5.1 were ever tagged, so the intermediate versions
have no comparison range to link. -->

[Unreleased]: https://github.com/luminartech/simple_doip/compare/v0.5.1...HEAD
[0.5.1]: https://github.com/luminartech/simple_doip/compare/v0.1.0...v0.5.1
[0.1.0]: https://github.com/luminartech/simple_doip/releases/tag/v0.1.0
87 changes: 87 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Contributing

Pull requests are welcome, as are bug reports and questions in the issue
tracker.

[`ARCHITECTURE.md`](ARCHITECTURE.md) is the place to start for anything beyond
a small fix. It covers the feature-gated layering, the sans-io framing/decode
seam, the error taxonomy, and — in its last section — the invariants to
preserve when changing the crate.

## Building and testing

The minimum supported Rust version is **1.88**. `default = []`, so a bare
`cargo test` exercises only the `no_std` core:

```sh
cargo test --all-features # everything
cargo test --features client,server # the async layers
cargo test --no-default-features # the no_std core alone
```

The `no_std` core must keep building for a bare-metal target:

```sh
rustup target add thumbv7em-none-eabihf
cargo check --no-default-features --target thumbv7em-none-eabihf
```

CI additionally checks each feature individually, `cargo fmt`, and
`cargo clippy --all-features -- -D warnings -Dclippy::pedantic`, and builds the
documentation with `RUSTDOCFLAGS=-D warnings`. Running the three commands above
plus `cargo fmt` and clippy locally will catch almost everything before it gets
there.

## Wire-format changes

`tests/golden_vectors.rs` decodes and re-encodes byte sequences held as `.hex`
files in `tests/golden/`. A change that alters the bytes on the wire should
either fail one of those vectors or add a new one — a round-trip test written
against the crate's own output passes whenever `encode` and `decode` share the
same misreading.

## Commits and pull requests

Commit subjects follow [Conventional Commits](https://www.conventionalcommits.org/)
(`feat:`, `fix:`, `docs:`, `build:`, `chore:`, with a `!` for a breaking
change), because the changelog is organized around them. Say what changed and
why in the body.

**The pull request title is the one that counts.** The repository merges by
squash with `squash_merge_commit_title: PR_TITLE`, so the PR title — not the
subjects of the commits on the branch — becomes the commit subject on `main`,
and that is what the changelog and the next version number are computed from.
A branch whose commits are immaculate still lands as whatever the PR title
says. CI lints the title for you.

## Releases

[release-plz](https://release-plz.dev) owns versioning, the changelog, tags,
GitHub releases, and the crates.io publish. There is no release workflow in
this repository and no version to bump by hand: a push to `main` maintains an
open release PR, and merging that PR publishes. `release-plz.toml` holds the
configuration, shared byte-for-byte with `uds_protocol` and
`automotive_wire_codec`.

The version comes out of the squashed subjects since the last release:

| Subject | Effect while `0.x` |
|---|---|
| `feat:` | minor |
| `fix:`, `perf:`, `refactor:`, `revert:`, `docs:` | patch |
| `chore:`, `ci:`, `build:`, `test:`, `style:` | nothing on their own |
| any of the above with `!`, or a `BREAKING CHANGE:` footer | minor |

Pre-1.0 a breaking change is a minor bump, so `!` is what lifts a `fix:` out
of a patch. Reach for it whenever a caller has to change something to keep
working — including changes the compiler will not flag. A function that
starts emitting different bytes breaks a caller as surely as a renamed
argument does, and `cargo-semver-checks` inspects the API surface, so it will
not catch that one for you.

## Licensing

Contributions are dual-licensed under
[MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at the user's option,
matching the crate itself. By opening a pull request you agree that your
contribution may be distributed under those terms.
Loading
Loading