1
0
Fork 0
mirror of https://github.com/notohh/rustlings.git synced 2025-10-08 19:48:39 -04:00

Done macro

This commit is contained in:
mo8it 2024-03-28 17:34:48 +01:00
commit e5efc68a91
5 changed files with 152 additions and 7 deletions

View file

@ -27,6 +27,28 @@ mod project;
mod run;
mod verify;
struct EmbeddedFile {
path: &'static str,
content: &'static [u8],
}
struct EmbeddedFlatDir {
path: &'static str,
readme: EmbeddedFile,
content: Vec<EmbeddedFile>,
}
struct ExercisesDir {
readme: EmbeddedFile,
files: Vec<EmbeddedFile>,
dirs: Vec<EmbeddedFlatDir>,
}
struct EmbeddedFiles {
info_toml_content: &'static str,
exercises_dir: ExercisesDir,
}
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code
#[derive(Parser)]
#[command(version)]
@ -87,6 +109,7 @@ enum Subcommands {
}
fn main() -> Result<()> {
let embedded_files = rustlings_macros::include_files!();
let args = Args::parse();
if args.command.is_none() {