Expand description
rusty_rtos_core — the shared vocabulary of the Kairos family.
Kairos is FreeRTOS remade in memory-safe Rust. This crate is Layer 0:
the handful of no_std types every other package speaks at its boundary,
so a task handle, a tick count, a priority or an error crosses from the
kernel to a port to a library with no conversion and no copy.
The laws it encodes (mission plan §2.5):
- Handles are indices, never pointers. Every kernel object lives in
an
arena::Arena; ahandle::Handleis a generational index and a stale one isError::Gone, not a use-after-free. - The list is index-linked.
list::Listsremakes FreeRTOS’slist.c—vListInsert,vListInsertEnd,uxListRemove, the round-robin cursor — over indices, so the scheduler core needs no pointer and nounsafe. - Time is a value.
tick::Tickis a monotonic count whose width is a type parameter mirroringconfigTICK_TYPE_WIDTH_IN_BITS. - One
Copyerror.Errorhas noString; it maps onto the C kernel’spdPASS/pdFAIL/errQUEUE_*codes for the C ABI. - The config is a type.
config::ConfigisFreeRTOSConfig.has associated constants;config::DefaultConfigmirrors the upstream template configuration value for value. - Four seams, traits only.
port::Port,heap::Heap,trace::Traceandhooks::Hooksare the only way the kernel touches a CPU, memory, an observer or the application. - The ISR side is a type.
isr::Isris the proof a*FromISRvariant demands; the wrong variant does not compile.
forbid(unsafe). No allocator, no arch, no product type. Feature ladder
std ⊃ alloc ⊃ core-only; CI holds the bare rungs on Cortex-M and
RISC-V on every push.
Re-exports§
Modules§
- arena
- A fixed-capacity, generational arena: where every kernel object lives.
- config
FreeRTOSConfig.has a type.- error
- One
Copyerror for the whole family. - handle
- Generational handles: the family’s answer to
TaskHandle_tand friends. - heap
- The Heap seam: the only way the kernel allocates.
- hooks
- The application hooks as a trait.
- isr
- The interrupt side as a type.
- list
list.cremade over indices: the scheduler’s ready, delayed, suspended and event lists without a pointer.- port
- The Port seam: the only way the kernel touches a CPU.
- prelude
- The names a kernel, a port or a firmware wants in scope.
- priority
- Task priorities, bounded at construction.
- tick
- The tick count, with its width as a type.
- time
- Durations and timeouts in the units a caller thinks in.
- trace
- The Trace seam: the oracle instrument.
Constants§
- FORMAT_
VERSION - The version of every byte format this family emits (the trace line format, the C ABI struct layouts). Readers refuse a version they do not know; the bump discipline is the mission plan’s §2.5.
- VERSION
- Crate version, for manifests and logs.