curd-editor-0.1.2 is not a library.
curd
A tiny terminal text editor written in Rust with crossterm, built step by step as a learning project.
Package name: curd-editor (curd is taken on crates.io). Command name: curd.
Install
Prebuilt binaries for Linux, macOS and Windows are on the releases page.
Run
Arrows / Home / End move the cursor, long files scroll, Ctrl+Q quits.
Test
- Unit tests sit next to the code in
src/document/tests.rsandsrc/editor/tests.rs. - End-to-end tests in
tests/e2e.rsstart the realcurdin a pseudo-terminal, send keys and check the screen (Linux/macOS only).
Test files are left out of the published crate (see include in Cargo.toml).
CI runs the tests on every push and pull request and saves a JUnit test report and a coverage report as artifacts on the run. Pushing a v* tag runs the same checks first and only publishes a release (GitHub binaries, then crates.io) if they pass.
Layout
src/main.rs— starts everything upsrc/terminal.rs— raw mode, alternate screen, screen size (restored on drop)src/document.rs— the text (lines) and opening filessrc/editor.rs— main loop, keys, scrolling, drawing
Progress
- Step 1: raw mode, read keys, Ctrl+Q
- Step 2: draw the screen with
~and a welcome message - Step 3: open a file and show it (modular refactor)
- Step 4: cursor movement and vertical scrolling
- Challenge: PageUp / PageDown
- Step 5: typing and deleting
- Step 6: save with Ctrl+S
- Status bar, search, syntax highlighting, undo
- LSP: diagnostics → hover → go to definition → completion