Thoughts on Panicking
2026-03-24As part of some work in collaboration with Open Device Partnership and Tweede golf, a question came up about how to think about panics in Embedded Rust code, and how different projects/ecosystems handle panicking.
This is a somewhat common question to answer in embedded systems, particularly when deciding what kinds of failures you intend your system to be robust against, and what strategies to employ when something inevitably goes wrong.
Like many systemic decisions, there are a lot of potential right answers, as well as a lot of wrong answers, and fairly often folks don't always explicitly plan for or against any particular scenario. The following discussion is aimed at helping folks early in the design process to consider what kind of system they would or would not like to build.
