lib-interrupt provides typed client helpers for the EriX interrupt routing service.
Find a file
Erik Inkinen 95159f93c1
All checks were successful
CI / test (push) Successful in 5s
CI / security (push) Successful in 1m26s
CI / minimal-versions (push) Successful in 11s
lib-interrupt: drop unstable rustfmt options for stable toolchains
2026-03-23 10:19:54 +02:00
.github Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
src Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
.editorconfig Initial commit 2026-03-06 12:04:31 +01:00
.gitignore Initial commit 2026-03-06 12:04:31 +01:00
ARCHITECTURE.md Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
Cargo.toml Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-06 12:04:31 +01:00
CONTRIBUTING.md Initial commit 2026-03-06 12:04:31 +01:00
LICENSE Initial commit 2026-03-06 12:04:31 +01:00
README.md Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
ROADMAP.md Add initial implementation of lib-interrupt with CI configuration 2026-03-07 11:58:53 +02:00
rustfmt.toml lib-interrupt: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:54 +02:00
SECURITY.md docs: align security policy phase numbering 2026-03-11 05:28:13 +02:00

lib-interrupt

lib-interrupt provides typed client helpers for the EriX interrupt routing service.

It wraps irqd request/response contracts and notify-event parsing into a small no_std API with strict validation.


Status

  • Request helpers implemented:
    • register_handler
    • set_mask
    • ack
  • Blocking wait helper implemented:
    • wait_next
  • Notify parsing accepts both framed notify messages and raw notify payload deliveries used by current runtime.

API model

The crate is transport-callback based.

Call-style operations accept a callback with signature:

  • FnMut(endpoint_slot, request_bytes, response_buf) -> Result<(status, response_len), transport_code>

Wait-style operation accepts:

  • FnMut(endpoint_slot, recv_buf, timeout_ticks) -> Result<(status, out_len), transport_code>

This keeps the crate runtime-agnostic and usable from baremetal service binaries without allocator requirements.


Validation guarantees

lib-interrupt validates:

  • endpoint slot non-zero,
  • line ID and mask-action range,
  • response size/op-id/request-id consistency,
  • notify payload shape and reserved fields.

Errors are returned as typed Error values.


Build and test

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features

Dependencies

  • lib-ipc

No third-party crates are used.