Skip to main content

saturnus_drive/
lib.rs

1//! Host-side helpers that drive a [`saturnus_core::Machine`] in emulated time,
2//! shared by the `saturnus` CLI and the Kermit test host: key scripts
3//! ([`script`]), the scripted session with its idle wait ([`session`]),
4//! the per-model boot and Kermit server start ([`autostart`]), ROM loading
5//! ([`rom`]) and its download from hpcalc.org ([`fetch`]), the screen as
6//! text or PNG ([`screen`]), the native hosts' files ([`files`]) and the machine thread that drives the front-end protocol's
7//! state machine (`saturnus_host::protocol`) for the desktop app and the
8//! CLI's control API ([`runner`]) with its auto-saves' writer thread
9//! ([`save_writer`]), and the HTTP servers on 127.0.0.1 of
10//! the control API and the desktop app's MCP endpoint, under one set of
11//! rules ([`loopback`]).
12//!
13//! Unlike the core crate this one does file I/O, so it is not meant for
14//! `wasm32`.
15#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
16
17pub mod autostart;
18pub mod fetch;
19pub mod files;
20pub mod loopback;
21pub mod rom;
22pub mod runner;
23pub mod save_writer;
24pub mod screen;
25pub mod script;
26pub mod session;
27
28// The README (the crate's page on crates.io) compiles as a doctest.
29#[cfg(doctest)]
30#[doc = include_str!("../README.md")]
31struct ReadmeDoctests;