Skip to content

Phase 2e: Port keyboard input and build orchestration to Rust - #34

Merged
zackees merged 1 commit into
mainfrom
rust/phase-2e-build-orchestration
Apr 12, 2026
Merged

zackees merged 1 commit into
mainfrom
rust/phase-2e-build-orchestration

Conversation

@zackees

@zackees zackees commented Apr 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add crates/fastled-cli/src/keyboard.rs: non-blocking space-bar detection via crossterm, with check_for_space() (poll once, no blocking) and start_listener() (background thread returning an mpsc::Receiver<KeyEvent>)
  • Add crates/fastled-cli/src/build.rs: BuildMode enum, BuildRequest and BuildResult structs mirroring build_types.py, and run_build() which delegates to python -m fastled.app --just-compile as a subprocess
  • Expose build_available() -> bool via the fastled-py PyO3 extension module
  • Register both modules in main.rs; the main loop still delegates everything to Python — integration comes in the next phase

Closes #22

Test plan

  • ./_cargo build --workspace — compiles cleanly
  • ./_cargo test --workspace — 44 Rust tests pass (9 new: 2 keyboard, 7 build)
  • ./_cargo clippy --workspace --all-targets -- -D warnings — clean
  • ./_cargo fmt --all --check — clean
  • bash lint — ruff / black / isort / pyright all pass
  • bash test — 121 Python tests pass

Add keyboard.rs (crossterm-based non-blocking space-bar detection) and
build.rs (BuildMode/BuildRequest/BuildResult types plus subprocess
run_build delegate) as library modules in fastled-cli.  Expose
build_available() via the fastled-py PyO3 extension.  Main loop still
delegates to Python; these modules are the building blocks for Phase 2e
integration.
@zackees
zackees merged commit 0badade into main Apr 12, 2026
1 of 9 checks passed
@zackees
zackees deleted the rust/phase-2e-build-orchestration branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 2e: Port keyboard input and build orchestration to Rust

1 participant