saturnus_objects/lib.rs
1#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
2//! HP 48/49 RPL objects for saturnus hosts (the web page, a desktop shell,
3//! the Kermit test host), without any I/O or protocol stack: builds for
4//! `wasm32` like the core.
5//!
6//! - [`object`]: the typed object model ([`Object`], JSON through serde)
7//! and the exact decoder of the calculator's nibble format.
8//! - [`ram`]: a read-only view of a paused machine's user memory: the
9//! HOME tree with each variable's type, size and checksum, the current
10//! directory, the data stack and the flags, straight from RAM (no Kermit
11//! server, no mode switch), plus a change counter for cheap polling.
12//! - [`names`]: command names read at run time from the loaded ROM's own
13//! library tables ([`NameTable`], built once per ROM).
14//! - [`decompile`]: the calculator's text for programs, algebraics, units
15//! and data objects in the display mode the flags select.
16//! - [`prolog`]: object types by prolog and the size walk.
17//! - [`cmdline`]: the command line being edited (text, cursor, open or
18//! not) and the editor's entry mode, alpha and shifts, from RAM.
19//! - [`transfer`]: the objects of Kermit transfers: binary transfer files
20//! decoded and encoded, sources from ASCII transfers, RPL source text
21//! for host commands (the protocol itself is the host's).
22
23pub mod charset;
24pub mod cmdline;
25pub mod decompile;
26pub mod menus;
27pub mod names;
28pub mod object;
29pub mod prolog;
30pub mod ram;
31pub mod transfer;
32
33pub use cmdline::{CommandLine, Editor, EditorLayout, command_line};
34pub use decompile::{NumberFormat, Settings, described, display, has_text, text};
35pub use names::{CommandInfo, NameStats, NameTable, UnitMarkers};
36pub use object::{
37 ArrayItem, Base, Graphic, Integer, MAX_CLONED_NIBBLES, MAX_DECODED_NIBBLES,
38 MAX_DECODED_OBJECTS, Memory, NoMemory, Object, Reader, Real, decode, decode_at, graphic,
39};
40pub use prolog::ObjectType;
41pub use ram::{
42 Flags, Layout, UserMemory, Variable, change_counter, current_path, flags, memory_tree,
43 stack_objects,
44};
45
46// The README (the crate's page on crates.io) compiles as a doctest.
47#[cfg(doctest)]
48#[doc = include_str!("../README.md")]
49struct ReadmeDoctests;