Expand description
Async I/O, filesystem, process, signal, stream, and timer primitives for
the dtact coroutine runtime.
Two backend families are available behind Cargo features:
native— hand-rolled, lock-free backends (io_uringon Linux, kqueue/IOCP elsewhere, thread-pool bridges where a true async syscall path doesn’t exist) built directly ondtact’s coroutine scheduler, notokiodependency.tokio(default) — thin wrappers overtokio’s equivalents, for embedding in atokio-based application instead ofdtactitself.
Each of the six primitive modules (io, fs, process, signal,
stream, timer) exposes the same public surface regardless of which
backend feature is enabled, so callers can switch backends without
rewriting call sites.
Modules§
- fs
- Async filesystem primitives.
- io
- I/O primitives: TCP listener/stream, UDP socket, native and
tokio-backed. - lockfree
- Shared lock-free building blocks used by every module in this crate’s native backends.
- process
- Async child-process primitives.
- signal
- Async signal delivery.
- stream
- In-process duplex byte-stream pipes.
- sync
- In-process async synchronization primitives — the
tokio::synccounterpart of this crate’s I/O modules. - timer
- Async timer primitives: sleep, interval, timeout.
Attribute Macros§
- fs_init
- Sibling to [
dtact_io_init] for thefsmodule: configures and starts whichever native fs backend is active (io_uring slot pool on Linux, IOCP slot pool on Windows, thread pool elsewhere — seedtact_util::fs::init_fs) before the wrappedmain/entry point runs. Takes the same five knobs asdtact_io_init(workers,buffer_pool_size,chunk_size,pin_cpus,ring_depth);ring_depthis what actually sizes the preallocated op-slot pool for fs ops. - init
- Configures and starts whichever native
iobackend is active (io_uring on Linux, IOCP on Windows, kqueue/mio elsewhere, or thetokiowrapper — seedtact_util::io::init_runtime) before the wrappedmain/entry point runs. Takes the same five knobs as [fs_init]/[process_init] (workers,buffer_pool_size,chunk_size,pin_cpus,ring_depth), the “power user” counterpart to the plaindtact_util::io::init(workers)convenience function. - process_
init - Sibling to [
fs_init] for theprocessmodule: starts the dtact-process blocking-thread pool before the wrappedmain/entry point runs. Same five knobs for call-site parity withfs_init/dtact_io_init; onlyworkersis actually consulted bydtact_util::process::init_processtoday (see that function’s doc for why the ring/buffer-pool knobs don’t apply to a thread-pool- bridged backend).