Sure, as long as your OS is written in Rust (and doesn't use any unsafe)