refactor(editor): extract editor + display into host-testable crates

Move the editor core out of the firmware crate (pinned to the xtensa
target, so it can't run `cargo test`) into a standalone `editor` crate,
with the panel framebuffer + geometry split into a `display` crate. Both
depend only on embedded-graphics + keymap, so the editor is now
host-buildable and unit-tested (8 characterization tests). Firmware links
them and re-exports the geometry from epd.rs; behaviour is unchanged.

The xtensa firmware build was not verified in this environment.
This commit is contained in:
Julien Calixte
2026-07-11 00:28:37 +02:00
parent 875658a661
commit e8063a2b13
7 changed files with 189 additions and 65 deletions

10
editor/Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
name = "editor"
version = "0.1.0"
edition = "2021"
description = "Modal (vim-style) text-editor core: the buffer, motions, edits, and e-paper layout/render. Depends only on embedded-graphics plus the display and keymap crates, so it builds and is tested on the host off the xtensa target (unlike the firmware crate it used to live in)."
[dependencies]
embedded-graphics = "0.8"
display = { path = "../display" }
keymap = { path = "../keymap" }

1277
editor/src/lib.rs Normal file

File diff suppressed because it is too large Load Diff