Rust is a modern systems programming language focused on safety, speed, and concurrency. It has become popular in recent…