Skip to main content

Crate kithara_platform

Crate kithara_platform 

Source
Expand description

Platform-aware primitives for native and wasm32 targets.

One backend tree per configuration — native, wasm, or flash — is selected by the gated glob re-exports below; the backends mirror one public module tree 1:1 (sync, thread, time, tokio, …) and 100% cross-platform code lives in common. All crate cfg lives in this file. See the crate CONTEXT.md for per-target backends.

Modules§

env
flash
logging
maybe_send
sync
Platform-optimal synchronization primitives (native), backed by parking_lot (no poisoning, smaller footprint).
thread
time
tokio
Mirror of the tokio surface the workspace is allowed to touch. Enumerated on purpose: a glob re-export is how unvetted primitives leak in unnoticed (see design doc §2). time/net/fs/io/process and the root spawn/spawn_blocking are intentionally ABSENT. task_local! is native-only (no task-scope surface in the wasm subset). signal is opt-in for desktop binaries that own process shutdown.
traits
Shared conversion traits used across the workspace.

Structs§

CancelGroup
OR-combinator for cancellation tokens.
CancelScope
A cancellation scope owned by a subsystem.
CancelToken
A handle into a cancel subtree.
CancelWakerGuard
Drop guard returned by CancelToken::on_cancel. Unregisters the waker on drop; holding it keeps the cancel-wake live.
Cancelled
Future returned by CancelToken::cancelled. Resolves once the token’s subtree is cancelled. Unpin; cancel-safe (drop unregisters its slot).