A lightweight CLI tool that randomly selects an entry from a compile-time seed file using Fibonacci hashing.
rune picks a single entry from a list you provide at build time. The list is embedded directly into the binary with no files, no runtime dependencies. Each invocation seeds the hash with the current time's nanosecond component, producing a fast, well-distributed selection with zero external dependencies.
At build time, rune reads the file pointed to by the SEED environment variable and embeds its contents into the binary. At runtime, it hashes the current nanosecond timestamp using the Fibonacci hashing constant 0x9e37_79b9_7f4a_7c15, shifts out the low-quality bits, and maps the result into the entry list.
- Rust stable
make
make build /path/to/your/seed-file
make installThe SEED path is resolved at compile time, so the binary is fully self-contained after make install.
runeRunning rune prints one randomly selected entry from the seed file it was built with.
An example seed file lives at examples/entries.txt. Each line is one entry.
dawn
dusk
ember
storm
frost
tide
gale
mist
Build with it to try rune immediately after cloning:
make build examples/entries.txt
./target/release/runemake test examples/entries.txtMIT, see LICENSE.