Making My Rust Program Space-Flight Ready
5 hours ago
- #error correction
- #Rust programming
- #radiation hardening
- A Rust crate called 'hugebool' introduces a 16-byte 'Booléan' type for radiation hardening.
- The 'Booléan' uses bit patterns (like alternating 0x55 and 0xAA) to make single-bit flips detectable and repairable via nearest-match decoding.
- Triple modular redundancy is implemented with a generic 'Rad' struct for voting and scrubbing, protecting any 'Eq + Copy' type.
- Benchmarks show hardened reads (e.g., with voting and scrubbing) are about 12 times slower than plain bool reads, but still fast (195 million per second).
- Limitations: protection only applies to heap-allocated data, not registers, instruction pointers, or other system components, unlike specialized hardware like the RAD750.
- The approach leverages Rust's type system to turn silent hardware errors into detectable ones, offering a cost-effective alternative for critical systems.