Rewrite initram in Rust