Convert rust_crate_map.cpp to Rust