Pictogram
Pictogram resolves icons at compile time using data stored in the manifest directory. During compilation an icon is looked up and baked into your application. This bypasses compilation penalties as the entire icon data does not have to be compiled by rustc.
Features
- Support for many libraries: See supported libraries for more information.
- Type-Safe: If an icon can't be resolved, it will lead to a compilation error.
- Compile-Time: Icons are baked into your code at compile time.
- Only pay for what you need: Only compile the icons, you actually use.
- Framework independent: Although, there is an adapter for dioxus.
- NOT vibe coded.
How to use it
# By default all features are enabled
= { = "*", =["material"] }
let svg = svg!;
println!;
Dioxus adapter
The adapter is available here.
// Define icons locally - from the index
define_icon!;
// Or from your local assets
define_icon!;
Supported libraries
Feel free to make a PR to add more libraries or ask for it in an issue.
| Library | Feature | License | Crate |
|---|---|---|---|
| Material design icons | material | Apache-2.0 | material |
| Bootstrap | bootstrap | MIT | bootstrap |
| Feather | feather | MIT | feather |
| Font Awesome | font-awesome | CC BY 4.0 | font-awesome |
| Tabler | tabler | MIT | tabler |
| Simple | simple | CC0-1.0 | simple |
| Heroicons | hero | MIT | hero |
| Ionicons | ion | MIT | ion |
| Lucide | lucid | ISC | lucide |
| Primer Octicons | oct | MIT | oct |
| Vscode Codicons | vscode | CC BY 4.0 | vscode |
License
This project is licensed under either
at your option.
Icon Licenses
All icons are licensed under their respective licenses. Please contact me, if any repository would like to be removed/updated.