lotsoftools

Rust UUIDV4 Crate

An example snippet of how to generate a UUID v4 in Rust.

use uuidv4::uuid;

fn main() {
    let my_uuid = uuid::v4();
    println!("Generated UUID: {}", my_uuid);
}

This Rust snippet shows how to generate a UUID v4 in Rust.

It uses the lightweight `uuidv4` crate, which you can install by running `cargo add uuidv4`