Something went wrong. Try again.
An experimental alternative to Rust sans-io that enables the direct style
Something went wrong. Try again.
911 B · 16 lines
Python
at experiments
1234567891011121314151617"""The host side of the effect-routines C ABI, for Python via ctypes.
Everything a Python host needs that is not about one particular program:
- ``codes`` the shared status/error codes and their names- ``codec`` the little-endian primitives (``u8``/``u32``/``u64``/``str``)- ``native`` loading a cdylib and the Rust-owned out-buffer protocol- ``scheduler`` a loop or a pool with timers, and a run-all harness
What stays with each program is its schema (which tags mean which effects),its world (scripted input, lookup table, counter, stdout), and its driver (howan awaited effect is answered — a typed reply call for the async-style greeters,the next step's input for the sans-io machine). This is the same cut as``../../rust/host_ffi`` makes on the Rust side: the library never sees an effect, onlybytes and codes. Copied into each experiment, not shared, so each stands alone."""