Rust: First Run

_

Mi'kail Eli'yah
15 min readDec 18, 2021

Start a project: $ cargo start <name_project>; cd name_project;
Here we use <name_project> := lab_00. You can name it arbitrarily.

Set the directory structures as follows:

$ tree -L 3
.
├── Cargo.toml
├── readme.txt
├── src
│ ├── config.rs
│ ├── libs
│ │ ├── mod.rs*
│ │ ├── lib_routines.rs
│ │ └── user_calls.rs
│ ├── main.rs
│ └── models
│ ├── mod.rs*
│ └── user_model.rs
* mod.rs := directory header filesNota bene: I leave a readme.txt as a journal for the project status and highlights.

mod.rs files in each directory are header files which declares the files in the folder.

│   ├── libs
│ │ ├── mod.rs*
"""
pub mod lib_routines; // lib_routines.rs
pub mod user_calls; // user_calls.rs
"""│ └── models
│ ├── mod.rs*
"""
pub mod user_model; // user_model.rs
"""
// main.rs
mod config;
mod routes;
mod models;

#[path = "libraries/cryptography/primitives/cipher/symmetric/aes/aes_agent.rs"]
mod aes_agent;
use aes_agent as aes_cipher;

mod header;

fn main() {
routes::health_route::print_health_route();
routes::user_route::print_user_route(); // main.rs => routes/user_route.rs =>…

--

--