Remix.run Logo
accelbred 2 days ago

No they could not. Rusts standard library heavily uses dynamic memory allocation and panics, for example. MISRA C:2025 Addendum 6 covers MISRA rules that still apply to Rust, as an example of how one would restrict Rust in safety-critical contexts.

steveklabnik 2 days ago | parent [-]

In safety critical contexts, you're not usually using the standard library. Or at least, you're using core, not alloc or std.

Panics can still exist, of course, but depending on the system design you probably don't want them either, which is a bit more difficult to remove but not the end of the world.

I hadn't seen that addendum though yet, that's very cool!

accelbred 2 days ago | parent [-]

Yeah, for work stuff where we follow MISRA conventions, its easiest to use no_std and ban using third-party crates as runtime dependencies.