roadmap PARTIAL

1140. line_editor: the release review's findings

The release review of partsfoundry/line_editor at commit 2c625ef6, made under milestone 1129 (the combine review), whose block sets its form. It compares the crate's public interface with the no_std line editors a stranger would choose instead, and lists what changes before the 0.1.0 interface. The baseline is milestone 1098 (what an outside maintainer would fix), its block, whose findings have all landed, and the cleared package notes/crate-reviews/line-editor.md. Neither is reopened here.

Reuse: the prior-art table weighs each line editor a caller could take instead.

Finding status

The status words are those script/review-status reads.

Open decisions

The one-way doors below, D1 to D6, each for the architect.

Goal

A stranger who needs a line editor on a target without an operating system meets an interface as plain as the best no_std editor's, with errors that say why, and with no word of the host it was written for.

What the review read and ran

The sources read, the commands run and the 54 API Guidelines items are in the appendix and the guidelines table.

Prior art

Measured from the crates.io API on 2026-11-26 (UTC). The problem a stranger brings to this crate is line editing with no allocator and no input or output of its own, so the ranked crates are the no_std editors. The std editors own the terminal and need an operating system; they stand in the table as neighbors.

crate role version read total 90 days reverse dependencies updated
embedded-cli ranked 1 0.2.1 67,517 18,816 0 2024-03-02
noline ranked 2 0.5.1 37,732 2,218 1 2024-12-12
menu neighbor: a command menu over a line 0.6.1 177,866 81,611 2 2024-11-29
rustyline neighbor: std, owns the terminal 19.0.0 62,718,541 15,764,807 1290 2026-10-17
reedline neighbor: std, owns the terminal 0.53.0 4,449,121 1,305,973 164 2026-11-09
linefeed neighbor: std, owns the terminal 0.6.0 667,251 49,665 36 2019-04-26
vte neighbor: an escape-sequence parser 0.15.0 101,230,691 30,436,222 203 2025-02-02
embedded-io integration: byte sink 0.7.1 203,586,087 93,397,838 352 2025-10-01
core::fmt::Write integration: text sink the standard library

embedded-cli passes 10,000 downloads in 90 days, so the review reads no system outside Rust.

What line_editor does better

The items

Effort is S (half a day), M (a day or two) or L (longer). A door is one-way when someone outside the repository acts on it once 0.1.0 is out. A P0 finding is one-way, so it lands in the 0.1.0 interface or not at all; a P1 finding is two-way and lands before the release.

P0: the 0.1.0 interface

P0-1. restore answers Option<()>, and Refusal is not an error

Verified in source (src/handoff.rs). Reader::new returns Result<Reader, Refusal>, but LineEditor::restore and RawQueue::restore return Option<()>, so a caller learns that a blob failed and not why. Refusal implements neither Display nor core::error::Error and is not #[non_exhaustive]. noline 0.5.1 returns NolineError and rustyline 19 returns ReadlineError, both with Display. On None the editor may hold half of the old state and half of the new; its own documentation tells the caller to discard it. Change: restore becomes a constructor, LineEditor::restore(&mut Reader) -> Result<LineEditor, Refusal>, and the same for RawQueue, so a half-written editor never reaches the caller. Refusal gains Display, core::error::Error and #[non_exhaustive], and a variant for a field that does not fit. The shared errors decision of milestone 1129 governs the shape. Door: one-way (D1). Effort: S.

P0-2. Event::None shadows Option::None

Verified in source (src/line_disc.rs). feed returns Event, whose first variant None means nothing to act on. A caller that writes use Event::* shadows the prelude's None, and Event::None beside an Option reads as a second kind of absence. No block ratifies the variant; the package lists it as part of the engine. noline 0.5.1 returns Option<Output> from its advance. Event is also not #[non_exhaustive], so a sixth event, such as a key the editor learns to report, breaks every caller's match. Change: feed returns Option<Event> and the variant goes. The other five variants keep their names, and Event becomes #[non_exhaustive]. Door: one-way (D2). Effort: S.

P0-3. pop_up_to_eight returns the host's reply shape

Verified in source (src/raw_queue.rs). It returns Option<(usize, u64)>, a count and up to eight bytes packed little-endian, because one host replies in registers. A stranger reads a wire shape where it expects a byte queue. std::io::Read::read and heapless::Deque hand bytes out into the caller's buffer, or one at a time. Change: replace it with a method that fills the caller's &mut [u8] and returns the count; the host packs its own registers. The name follows design/naming.md and is provisional until ratified. Door: one-way (D3). Effort: S.

P0-4. The handoff publishes its encoding

Verified in source (src/handoff.rs). Writer and Reader are public with their primitives (bytes, u32, field), and so are MAGIC and LAYOUT. A caller can write or read a blob piece by piece, so the order of its words becomes interface: any reordering breaks that caller even when LAYOUT moves with it. The only use the crate documents is to save an editor and a raw queue and restore them later. Change: the public surface is one save and one restore, over the caller's buffer, and the primitives, MAGIC and LAYOUT become private. The blob stays a format this crate alone reads and writes. Door: one-way (D5). Effort: S.

P1: before the first release

P1-1. The host protocol's words in the crate's documentation

Verified in source. src/raw_queue.rs names OPERATION_READRAW and "the register-only reply", src/line_disc.rs names "a READLINE request", and the fuzz target fuzz/fuzz_targets/line_editor_handoff.rs names "a granted frame". None names the host, but each assumes it. Change: describe each in terms of the crate's own interface. Door: two-way. Effort: S.

P1-2. Four public types have no Debug

Verified in source. LineEditor, RawQueue, handoff::Writer and handoff::Reader implement no Debug (C-DEBUG), and Event has no Hash. Every comparator type a caller holds implements Debug. Change: a Debug for each, printing lengths and positions rather than the line, and Hash on Event. Door: two-way. Effort: S.

P1-3. A dyn Sink cannot reach the sink parameter

Verified in the signatures (src/line_disc.rs, src/output.rs). Every method takes out: &mut impl Sink, whose implicit Sized bound refuses &mut dyn Sink (C-OBJECT). The methods already borrow the sink, so C-RW-VALUE holds without more. Change: the bound becomes S: Sink + ?Sized. Door: two-way, since a relaxed bound breaks no caller. Effort: S. A blanket impl<S: Sink + ?Sized> Sink for &mut S is a separate question and not two-way. A downstream crate may implement Sink for &mut TheirType, since &mut is a fundamental type, and a later blanket implementation would collide with it. It is door D6.

P1-4. No failure sections, and five items without an example

Verified in source. Reader::new, Writer::finish and both restore methods describe their failures in prose with no # Errors heading (C-FAILURE). RawQueue, Sink, expand_output, Writer and Reader have no example (C-EXAMPLE). The crate page and LineEditor do. Change: the headings and the examples. Door: two-way. Effort: S.

P2: may follow

P2-1. The manifest has no documentation key

Verified in Cargo.toml (C-METADATA). Change: documentation = "https://docs.rs/line_editor". Door: two-way. Effort: S.

P2-2. An embedded-io adapter

Verified in the comparators' manifests. All three no_std comparators write through embedded_io::Write, and line_editor has its own Sink. An adapter type behind a feature lets a caller hand an embedded-io writer straight in. Change: after the byte-sink decision, an optional adapter under the feature name it picks. Door: two-way (an addition). Effort: S.

P2-3. Capacities the caller chooses

Verified in source. The line, history and prompt sizes are constants (256, 8 and 64 bytes); noline 0.5.1 takes the caller's buffers. Defaulted const generic parameters would let a caller size the editor with the defaults unchanged. The handoff layout then needs the sizes in its blob or its LAYOUT. Change: defaulted const generics, if a caller asks. Door: two-way. Effort: M.

P2-4. UTF-8 input

Verified in source and the README's BUGS section. The editor drops a byte at or above 0x80, so typed UTF-8 vanishes; noline 0.5.1 edits UTF-8 by character. Change: cursor movement by character, behind no feature. Door: two-way, as a behavior change the CHANGELOG states. Effort: M.

Measured performance

Not run. The interface takes one byte per call at the rate a person types or a serial line delivers, and nothing in its shape (no allocation, no copy beyond the echo) is a cost a benchmark would separate from the comparators'.

One-way doors

Each for the architect, one at a time.

Follow-on

Done when

Every P0 and P1 finding reads Done, or Will not fix with its ruling, the architect has ruled D1 to D6, and script/review-status shows the block BUILT.

BUGS

Index row

The release review of line_editor against embedded-cli, noline and the std editors: four one-way interface changes before 0.1.0, four two-way fixes before the release, six doors to rule.