[REQ] Checked Mode
Description
Provide a middle-ground between debug and release mode where assertions/safety checks are enabled but the build is still done using optimization turned on.
Context
MuJoCo-Warp is exploring a mode like this to improve the CI. Currently a lot of out-of-bounds memory accesses are uncaught due to the fact that they still end up in allocated memory. We would like to catch issues like these earlier with some sanity checks that can be turned on, but still keep the CI runtimes low of possible. In addition, these issues usually only arise in optimized builds, making debug mode good enough to catch them.
I'm gonna delay this to the 1.13* milestone. After thinking through my existing merge request (on GitLab) more, I need more time to think through the debugging experience with this feature.