Download the latest version from Releases.
- Install Rust
- Check source code
cargo check
- Build binary
cargo build
- Run tests
cargo test
Note: for release target, add --release
- Run binary
cargo run # for debug version
# or
./target/release/primos-adri # for release version
primos-adri --help
Generator and checker of Primos de Adri
Usage: primos-adri <COMMAND>
Commands:
check Check if a given number is Primo de Adri
generate Generate Primos de Adri with given digits
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help information
-V, --version Print version information
primos-adri generate --help
Generate Primos de Adri with given digits
Usage: primos-adri generate [OPTIONS]
Options:
-d, --digits <DIGITS> [default: 5]
-h, --help Print help information
-V, --version Print version information
Check if a given number is Primo de Adri
Usage: primos-adri check --number <NUMBER>
Options:
-n, --number <NUMBER>
-h, --help Print help information
-V, --version Print version information
primos-adri check --number 772757
772757 is a Primo de Adri!
primos-adri check --number 332757
332757 is NOT a Primo de Adri!
primos-adri generate --digits 5
66 Primos de Adri up to 100000:
22277
22727
22777
23227
23327
23357
23537
23557
25237
25357
25537
25577
27277
27337
27527
27737
32237
32257
32327
32377
32537
33377
33577
33757
35227
35257
35327
35527
35537
37277
37337
37357
37537
52237
52727
52757
53327
53377
53527
53777
55337
57527
57557
57727
57737
72227
72277
72337
72577
72727
73237
73277
73327
73727
73757
75227
75277
75337
75377
75527
75557
75577
77237
77377
77527
77557
This project is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.