| Crates.io | anarchist-readable-name-generator-lib |
| lib.rs | anarchist-readable-name-generator-lib |
| version | 0.2.0 |
| created_at | 2022-02-19 12:41:26.909502+00 |
| updated_at | 2025-07-10 19:22:41.598874+00 |
| description | Generate a readable name from something with with famous anarchist writers |
| homepage | |
| repository | https://codeberg.org/PurpleBooth/anarchist-readable-name-generator-lib |
| max_upload_size | |
| id | 535172 |
| size | 502,090 |
This library uses the authors from Anarchist Library to generate a random name
The intention here is to have a random name for situations you need to spin up some cloud compute resources and don't have a name in mind. Typically, for throwaway purposes.
It's possible to simply generate a random name
use anarchist_readable_name_generator_lib::readable_name;
assert!(readable_name().len() > 0);
You can also pass a seed or change the separator to give you predictability or minor customization.
use anarchist_readable_name_generator_lib::readable_name_custom;
use rand::prelude::*;
use rand_chacha::ChaChaRng;
let rng = ChaChaRng::seed_from_u64(2);
assert_eq!(
readable_name_custom("+", rng),
"romantic+kamalmaz"
);
You can also increase entropy a little by suffixing a random number
use anarchist_readable_name_generator_lib::readable_name_custom_suffix;
use rand::prelude::*;
use rand_chacha::ChaChaRng;
let rng = ChaChaRng::seed_from_u64(2);
assert_eq!(
readable_name_custom_suffix("+", rng),
"dynamic+lepper3"
);
Read more at Docs.rs