1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright (C) 2026 Piers Finlayson <piers@piers.rocks>
//
// MIT License
//! Shared, transport-free logic for One ROM applications.
//!
//! `onerom-app` holds the logic that every One ROM *application* needs but that
//! is not specific to any one of them: the CLI, Studio, the web tool (via
//! WASM), and embedded programmers such as Airfrog. It is deliberately
//! `no_std` (with `alloc`) and performs **no I/O of its own** - all network and
//! filesystem access is delegated to the host through the [`PluginFetch`]
//! trait.
//!
//! # Design
//!
//! The crate separates two concerns that different hosts combine differently:
//!
//! - **Decisions** are pure and synchronous: parsing manifests, selecting a
//! compatible release, verifying a binary, generating a chip-set config.
//! These never touch the network and return [`PluginError`] directly.
//! - **Fetching** is asynchronous and host-specific. The crate never fetches;
//! it asks the host to, via [`PluginFetch`], and threads the host's own error
//! type back out through [`Error`].
//!
//! This split is what lets the same logic serve a `reqwest`-based CLI, a
//! JS-`fetch`-based WASM build, and an SWD-based embedded programmer without
//! any of them sharing a transport.
//!
//! # Membership
//!
//! Code belongs in `onerom-app` only if it is **shared across One ROM
//! applications** *and* buildable under `no_std`. Logic specific to a single
//! application (for example the CLI's `--slot` string grammar, or its
//! interactive confirmation prompting) stays in that application. The `no_std`
//! constraint is enforced by a CI job that builds the crate for a bare-metal
//! target with `--no-default-features`.
extern crate alloc;
pub use ;
pub use ;
/// Returns the version of this crate, as set in `Cargo.toml`.