Adding Rust implementation