Expand description
§Dtact-V3: Distributed Task-Aware Coroutine Toolkit
Dtact is a high-performance, low-latency asynchronous runtime designed for systems-level
programming across heterogeneous architectures (x86_64, AArch64, RISC-V).
§Core Architecture
- Lock-Free Arena: A page-aligned memory pool for fiber contexts, providing O(1) allocation and hardware-level guard pages for memory safety.
- P2P Scheduler Mesh: A distributed work-stealing/deflection scheduler that minimizes L3 cache thrashing and maximizes NUMA-local execution.
- Zero-Copy Migration: Leveraging self-referential futures and direct stack-top injection to move running tasks across cores without heap allocation.
Dtact provides tiered safety levels (0-2) allowing developers to trade off between raw performance and hardware-enforced isolation (e.g., guard pages and SEH registration).
Structs§
- dtact_
handle_ t - Handle for C-compatible FFI. Opaque handle representing a spawned Dtact fiber.
Enums§
- Dtact
Error - Runtime error types. Errors encountered during Dtact Runtime operation.
Functions§
- cldemote
- Hardware-level demotion API. Hardware-Assisted Optimization: Proactively push data to L3 cache
- dtact_
await - Wait for a fiber to complete. Blocks the current thread until the specified fiber terminates.
- set_
deflection_ threshold - Set the deflection threshold for the DTA-V3 Scheduler. Sets the work-deflection threshold for a specific hardware worker.
- spawn
- Spawn a fiber. Spawns a new fiber and returns a handle for synchronization.
- spawn_
with_ stack - Spawn a fiber with a custom stack size. Spawns a fiber from a closure with a specific stack configuration.
- uintr_
signal - Hardware-level interrupt signaling API. User-mode interrupt wakeup signal
- wait
- Wait for a fiber to complete. The core execution bridge between Rust Futures and Dtact Fibers.
- yield_
now - Yield execution to the scheduler. Yields execution to the scheduler.
- yield_
to - Yield execution to another fiber. Yields execution to another fiber handle asynchronously.
Attribute Macros§
- dtact_
init - Attribute macro for initializing the Dtact runtime.
- export_
async - Attribute macro for exporting an async function to C.
- export_
fiber - Attribute macro for exporting a fiber to C.
- task
- Attribute macro for defining a Dtact task.