2 releases
Uses new Rust 2024
0.1.1 | Aug 5, 2025 |
---|---|
0.1.0 | Jul 31, 2025 |
#1634 in Web programming
23 downloads per month
16KB
152 lines
Lucide SVG
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)
}
No runtime deps
~0–2.1MB
~27K SLoC