Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reamde #27

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
* rustic_factors
=rustic_factors= is a personal project that explores various number factorization algorithms using Rust. It is designed to learn advanced Rust features such as generics, dynamic dispatch, and procedural macros while experimenting with essential design patterns including Strategy, Builder, and New Type. For a detailed overview of the project architecture and the application of these patterns, please refer to the accompanying =ARCHITECTURE.org=.

** Installation
To install =rustic_factors=, ensure Rust and Cargo are installed on your machine. You can then build the project using =cargo=

#+BEGIN_SRC shell
$ cargo build --release
#+END_SRC

To ensure your installation is functioning as expected, run the test suite with

#+BEGIN_SRC shell
$ cargo test
#+END_SRC

** Usage
To use =rustic_factors=, specify an algorithm and a positive number less than 2^{512}

#+BEGIN_SRC shell
$ cargo run --release [algorithm] [number]
#+END_SRC

For example, to factorize the number $8051$ using Pollard's Rho, enter

#+BEGIN_SRC shell
$ cargo run --release pollards_rho 8051
#+END_SRC

Additional factorization commands are =fermats_factorization_method= and =trial_division=. Additionally, =rustic_factors= includes the Miller-Rabin primality test to check if a number is prime

#+BEGIN_SRC shell
$ cargo run --release miller_rabin 561
#+END_SRC

This command checks whether $561$ is a prime number using the Miller-Rabin test.
Loading