RealtimeSanitizer for Rust
5 comments
·January 21, 2025jtwaleson
Ok so basically they are introducing annotations so that the compiler can reason about the code and warn the programmer for non-realtime usage.
When you think about it, it's a lot like a type system.
I haven't worked with realtime systems, but I have other constraints. E.g. I want the memory usage of a function to stay within x kilobytes, or I want an api call to return within a second, or I want to ensure there is no PII being sent to the logs.
I sincerely hope that in the future we'll have languages that cater to these kind of constraints. Think function coloring on steroids. This way the compiler can help figure out problems and we need way less tests.
actionfromafar
It feels like a lot of such constraints should be possible already in some languages...
nevi-me
This looks like it could also be useful in embedded programming, specifically around detecting allocations in platforms that allow them.
saagarjha
Does this flag loops as well?
The remark on flagging mutex use was quite interesting. From afar, using mutexes in real-time code seems like asking for ~trouble~ formal validation.