|
1 |
| -## Rust Everywhere: Crypto Library |
| 1 | +## Rust Crypto Library |
2 | 2 |
|
3 |
| -**Crypto** is a sample Rust Library that showcases cross-platform compilation for different projects and environments. |
| 3 | +**Crypto** is a sample **Rust Library** that showcases **cross-platform compilation for different projects and environments**. In terms of functinality it only simulates **'encryption/decryption'** by using `base64 encoding/decoding`. This is just for **LEARNING PURPOSE**. |
| 4 | + |
| 5 | +In order to fully understand the purpose of this repo, please refer to the follwing blog posts: |
| 6 | + |
| 7 | + - **TODO:** Blog Post one |
| 8 | + - **TODO:** Blog Post two |
| 9 | + - **TODO:** Blog Post three |
4 | 10 |
|
5 | 11 | ## Local Development
|
6 | 12 |
|
7 |
| - - `cargo build` |
8 |
| - - `cargo test` |
| 13 | + - `cargo build` -> builds the entire project. |
| 14 | + - `cargo test` -> run all the tests. |
| 15 | + |
| 16 | +## Sub-projects |
| 17 | + |
| 18 | +The Crypto Library is composed by a [Rust Workspace](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html) containing a set of crates (listed below). |
| 19 | +### cryptor |
| 20 | + |
| 21 | +It is the core domain library, which contains the main logic for **encryption/decryption.** |
| 22 | + |
| 23 | +**Available commands:** |
9 | 24 |
|
10 |
| -### Bumping dependencies |
| 25 | +```bash |
| 26 | +$ cargo build //build the debug version of the project. |
| 27 | +$ cargo build --release //build the release version of the project. |
| 28 | +$ cargo test //run all the tests. |
| 29 | +``` |
| 30 | +### cryptor_jni |
11 | 31 |
|
12 |
| - - `cargo update` |
| 32 | +This crate fully depends on the `crypto` crate and its main purpose is to act as a proxy between Rust and Android (Java/Kotlin) via JNI. |
| 33 | + |
| 34 | +**Available commands:** |
| 35 | + |
| 36 | +```bash |
| 37 | +$ cargo build //build the debug version of the project. |
| 38 | +$ cargo build --bin release //build the release version of the project for all android targets. |
| 39 | +$ cargo build --bin publish //copy all the released libraries/crates inside the android project. |
| 40 | +$ cargo test //run all the tests. |
| 41 | +``` |
| 42 | + |
| 43 | +### cryptor_c |
| 44 | + |
| 45 | +Still a TODO |
13 | 46 |
|
14 | 47 | ## Rust Useful References
|
15 | 48 |
|
16 |
| - - [Transition a project to a new Rust Edition](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html) |
| 49 | + - [Transition a project to a new Rust Edition](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html) |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +<a href="https://www.buymeacoffee.com/android10" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a> |
0 commit comments