https://github.com/conways-glider/identicon-rs
A simple identicon implementation in rust
https://github.com/conways-glider/identicon-rs
identicon image rust rust-lang rust-library
Last synced: 3 months ago
JSON representation
A simple identicon implementation in rust
- Host: GitHub
- URL: https://github.com/conways-glider/identicon-rs
- Owner: conways-glider
- License: apache-2.0
- Created: 2019-02-14T04:58:26.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T03:48:18.000Z (4 months ago)
- Last Synced: 2025-04-09T20:08:53.612Z (3 months ago)
- Topics: identicon, image, rust, rust-lang, rust-library
- Language: Rust
- Homepage: https://crates.io/crates/identicon-rs
- Size: 191 KB
- Stars: 18
- Watchers: 0
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Identicon-rs
[](https://github.com/conways-glider/identicon-rs/actions/workflows/rust.yml)
[](https://deps.rs/crate/identicon-rs/6.0.2)
[](https://crates.io/crates/identicon-rs)
[](https://docs.rs/identicon-rs)This is an Identicon implementation in rust.
## Documentation
- [docs.rs](https://docs.rs/identicon-rs)
- [GitHub Pages](https://conways-glider.github.io/identicon-rs/)## Example
```rust
use identicon_rs::error::IdenticonError;
use identicon_rs::Identicon;fn main() -> Result<(), IdenticonError> {
let conways_glider = String::from("conways-glider");
let test_string = "identicon_rs";// stored example
let identicon_conways_glider = Identicon::new(&conways_glider);
identicon_conways_glider.save_image("output_1.png")?;// chained example with no border
Identicon::new(test_string)
.set_border(0)
.save_image("output_2.png")?;
Ok(())
}
```You can run this example with `cargo run --example main`.
The repository contains an example webservice that you can run with `cargo run --example webserver`.
You will obtain images analogous to the following ones:
![]()
![]()
![]()
## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
* MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.