lucide-svg

Crates.iolucide-svg
lib.rslucide-svg
version0.1.1
created_at2025-07-31 00:00:24.783588+00
updated_at2025-08-05 15:15:19.069745+00
descriptionLucide static icons in Rust
homepage
repositoryhttps://github.com/KrisNK/lucide-svg
max_upload_size
id1774205
size51,678
Kris K (KrisNK)

documentation

README

Lucide SVG

Crates.io Version Crates.io License

Lucide static icons in Rust.

How it works

When you build your project with lucide-svg, a build script runs. It downloads all SVG icons, from the latest lucid-static unpkg CDN, and generates a struct for each icon.

Furthermore, each struct implements Debug, Display, Clone, Copy, and, the crate defined trait, LucideIcon.

Usage

use lucide_svg::LucideIcon;
use lucide_svg::House;

// all icons implement the `LucideIcon` trait
struct Icon(Box<dyn LucideIcon>);

fn foo(icon: impl LucideIcon) -> Icon {
    Icon(Box::new(icon))
}

fn make_house() -> Icon {
    // all icons implement `std::fmt::Display` (and Debug too)
    println!("house icon: {}", House);

    foo(House)
}
Commit count: 0

cargo fmt