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
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ jobs:

- uses: mlugg/setup-zig@v2
with:
version: 0.15.1
version: 0.16.0

- name: Build examples and benchmark
run: zig build

- name: Run tests
run: zig build test

- name: Build optimized artifacts
run: zig build -Doptimize=ReleaseFast
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased
- Require Zig 0.16.0; replace public peer addresses with `std.Io.net.IpAddress`
- Retain the Linux io_uring backend with native-address conversion at syscall boundaries
- Use monotonic clocks for protocol deadlines and timing
- Update allocator examples, benchmark argument handling, OpenSSL process APIs and CI
- Vectorize full-block CCM CBC-MAC XOR; add independent boundary test vectors
- Add `--payload-only` benchmark filtering and document migration performance measurements

## [0.7.2] - 2026-03-21
- Fix: Block1 reassembled body now reaches handler (#81)
- Fix: Observe notifications use correct per-observer token (#82)
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const std = @import("std");
const coap = @import("coap");

pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
var gpa = std.heap.DebugAllocator(.{}){};
defer _ = gpa.deinit();

var server = try coap.Server.init(gpa.allocator(), .{}, echo);
Expand All @@ -66,7 +66,7 @@ const router = coap.Router(.{
});

pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
var gpa = std.heap.DebugAllocator(.{}){};
var server = try coap.Server.init(gpa.allocator(), .{}, router.handler());
defer server.deinit();
try server.run();
Expand Down Expand Up @@ -99,7 +99,7 @@ const std = @import("std");
const coap = @import("coap");

pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
var gpa = std.heap.DebugAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();

Expand Down Expand Up @@ -192,7 +192,7 @@ The request provides convenience accessors and the underlying packet:
- `deferResponse()` — defer the response for async handling (separate response)
- `observeResource(rid)` / `removeObserver(rid)` — observe registration
- `packet` — the full parsed CoAP packet for advanced use
- `peer_address` — source address of the client (`std.net.Address`)
- `peer_address` — source address of the client (`std.Io.net.IpAddress`)
- `arena` — per-request arena allocator (resets after handler returns)

### Response
Expand Down Expand Up @@ -892,12 +892,23 @@ zig build bench -Doptimize=ReleaseFast
```

Filter flags: `--plain-only`, `--dtls-only`, `--con-only`, `--non-only`,
`--single-only`, `--multi-only`, `--ipv6`. Use `--help` for all options.
`--single-only`, `--multi-only`, `--payload-only <0|100|1000>`, `--ipv6`.
Use `--help` for all options. For performance comparisons, run one scenario
per invocation to avoid outstanding NON traffic affecting the next scenario's
server-side counters. See [the Zig 0.16 migration measurements](docs/ZIG_016_PERFORMANCE.md).

## Requirements

- Linux (io_uring support, kernel 5.13+ for multishot recvmsg)
- Zig 0.15.1+
- Zig 0.16.0 (the currently supported toolchain)

### Migrating from Zig 0.15

The public peer address type is now `std.Io.net.IpAddress`. Use
`IpAddress.parse(host, port)` instead of `std.net.Address.parseIp`, access
IPv4/IPv6 values through `.ip4`/`.ip6`, and use `.getPort()` for ports.
The server still uses preallocated Linux io_uring operations; the server/client
initialization signatures and handler interface are unchanged.

## Roadmap

Expand Down
Loading
Loading