indivisible-rs/README

44 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-03-01 17:15:06 +00:00
===================
*** Indivisible ***
===================
2021-03-03 12:33:04 +00:00
Indivisible is an optimized prime number generator and tester written in Rust.
2021-03-01 17:15:06 +00:00
# Building
----------
To build the project you will require the Rust compiler and build
system, `cargo`. At which point you simply run `cargo build` in the root
directory of the project. To create an optimized release build append
the `--release` flag to the previous command.
2021-03-03 10:57:19 +00:00
# Usage
-------
The purpose of Indivisible is to find the nth prime and all the primes
before it. The basic usage is `indivisible <n>` where `n` is the ordinal
of the prime you'd like to find. To display all primes before `n`, you
can run verbose mode by using the `--verbose` or simply `-v` option.
Since Indivisible generates primes using previously computed primes, you
can also import prime numbers previously computed with the `--import` or
`-i` option. To store already computed primes you are expected to use
piping like any UNIX user would expect. Here is an example:
# store first 100 primes in ./primes
indivisible -v 100 > ./primes
# appends next 400 primes
indivisible -i ./primes -v 500 >> ./primes
# display the 600th prime
indivisible -i ./primes 600
2021-03-01 17:15:06 +00:00
# Legacy
--------
2021-03-03 10:57:19 +00:00
This project was originally written in C. It can be found on my GitLab
page.[1]
2021-03-01 17:15:06 +00:00
# License
---------
This project is licensed under the terms & conditions of the GNU General
Public License version 3 or greater (see `LICENSE` file for more
information).
2021-03-03 10:57:19 +00:00
[1] https://gitlab.com/naortega/Indivisible-legacy