Show HN: Ratchet – safe SPI flash writes (polling, erase-verify) in Rust
Ratchet is a Rust library that provides safe SPI flash write operations, featuring polling-based writes and erase-verify steps to ensure data integrity.
Background
Ratchet is a new Rust library for safely writing to SPI flash memory chips. SPI flash is a common, cheap type of storage found in embedded devices (routers, sensors, microcontrollers). The library addresses a reliability gap: standard flash drivers often lack "erase-verify" (checking that the memory cell is truly cleared before writing) and proper polling (waiting for the chip to finish an operation before proceeding). Without these steps, writes can silently corrupt data. Ratchet formalizes flash operations as a state machine to enforce these safety checks at compile time. Created by GitHub user jackulau (Jack U.) as a hobby/open-source project. Matters because embedded systems increasingly use Rust for safety-critical roles (IoT, automotive, aerospace) where memory corruption is a real risk.