r/rust•
Apothum

badge-maker: Rust library for generating shields.io badges

Rust version of the npm badge-maker library. Flat, plastic, and flatsquare styles are supported but planning on supporting the rest. Still some optimizations to be done but so far it's ~2-3 times faster than the node based version. All feedback welcome!

crates.io

docs.rs

github.com

Example

result

use badge_maker::BadgeBuilder;

let svg = BadgeBuilder::new()
      .label("badge")
      .message("maker")
      .color_parse("#33B5E5")
      .build()?
      .svg();

println!("{}", svg);

Posted Jan 8, 2021, 8:49 PM UTC

220

No comments yet

Nobody commented on this post, or the comments weren't captured.