arty_io_host 0.1.0

Unstable I/O driver hosting utilities for the Arty runtime.
docs.rs failed to build arty_io_host-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Arty Io Host

crate.io docs.rs MSRV CI Coverage License

Unstable I/O driver hosting utilities for the Arty runtime.

This crate is implementation infrastructure for arty. Applications and libraries should use arty instead of depending on this crate directly.

The items are public because Arty consumes them across a crate boundary. They do not form a standalone stability or compatibility promise.

Quick start

Clone the runtime-wide registry for each worker, relocate the clone onto that worker, and then create its driver host:

// One runtime-wide value owns the shared context registry and telemetry sink.
let runtime = IoRuntime::new(Sink::noop());
let worker = ThreadBuilder::default().build(std::thread::current().id());

// Each worker receives a clone that must be relocated on the destination
// thread before its worker-local host is created.
let mut worker_runtime = runtime.clone();
worker_runtime.relocate(None, &worker);
let host = worker_runtime.driver_host(Waker::noop().clone());

// The runtime calls this from its worker loop with the available wait time.
host.execute_cycle(Duration::ZERO)?;