Skip to content

Latest commit

 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

    ____                   ___           __  
   / __ \____  _________ _/ (_)___  ____/ /  
  / /_/ / __ \/ ___/ __ `/ / / __ \/ __  /   
 / _, _/ /_/ (__  ) /_/ / / / / / / /_/ /    
/_/ |_|\____/____/\__,_/_/_/_/ /_/\__,_/   

This project aims to solve Rosalind's problems and package them in a command-line interface (CLI) format.

Repo structure

rosalind-cli/  
├── Cargo.toml           
├── scripts/  
├── src/  
│   ├── main.rs           
│   ├── lib.rs          
│   └── problems/       
│       ├── mod.rs      
│       ├── prob1/  
|       |    ├── mod.rs  
|       |    ├── args.rs  
|       |    ├── solve.rs    
│       ├── prob2/     
│       └── ...         
└── README.md

Structure of problem solving

  • solve.rs: It contains the code to solve the problems.

  • mod.rs: It connects the args and solve modules to the problem folder, organizing internal references and making them accessible to the parent module.

  • args.rs: It defines the command-line arguments specific to the problem, usually using clap to parse and validate user inputs.

Automatic problem structure generator

To make it easier to create new problems while maintaining the project's structure, the add_problems.rs script was designed. It checks the name of the problem to be created and automatically creates the (blank) files in the folder with the name of the problem.

Usage:

rustc scripts/add_problem.rs -o add_problem #check the path!

./add_problem PROB

Result:

src/problems/PROB/  
├── args.rs  
├── mod.rs   
└── solve.rs  

Problems solved

Get in touch

Gmail  LinkedIn  Github 

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages