3 releases (breaking)

0.3.0 May 30, 2019
0.2.0 Jul 11, 2017
0.1.0 Mar 24, 2017

#6 in #identicon

38 downloads per month

MIT and GPL-3.0 licenses

11KB
194 lines

blockies.rs

Build Status

library that generates blocky identicons

Rust implementation of javascript blockies library. Supports also ethereum blockies

Library usage

use blockies::Ethereum;

let blockies = Ethereum::default();
let mut png = Vec::new();

blockies.create_icon(&mut png, b"0x01122df2b7d1c0a6ad94589da045af3885bedbbc");

// `png` now contains a rendered image of the blockies for that address
assert_eq!(png.len(), 179);

CLI Usage

build with

cargo build --release -p blockies-cli
blockies 0.1.1
debris <marek.kotewicz@gmail.com>
blockies cli

USAGE:
    blockies [OPTIONS] --seed <seed>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --mode <mode>        Choose blockies image type
        --output <output>    Output file path
        --scale <scale>      Blockies pixel size
        --seed <seed>        Seed phrase for generating new image
        --size <size>        Blockies image size

TODO

  • specifying colors via cli

Dependencies

~785KB
~15K SLoC