refactor projekt to implement and test other cli libs

This commit is contained in:
Leo Drachenfeuer 2022-12-13 05:02:02 +01:00
parent f091f19a55
commit 8b16296d5e
Signed by: dragonleo
GPG key ID: A8338FC081137CF0
34 changed files with 35 additions and 15 deletions

15
Cargo.lock generated
View file

@ -3,9 +3,14 @@
version = 3
[[package]]
name = "adventofcode2022"
name = "aoc"
version = "2022.1.0"
[[package]]
name = "aoc22-clap"
version = "2022.1.0"
dependencies = [
"aoc",
"clap",
]
@ -118,9 +123,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.137"
version = "0.2.138"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
[[package]]
name = "linux-raw-sys"
@ -184,9 +189,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.36.4"
version = "0.36.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23"
checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588"
dependencies = [
"bitflags",
"errno",

View file

@ -1,8 +1,6 @@
[package]
name = "adventofcode2022"
version = "2022.1.0"
edition = "2021"
[workspace]
[dependencies]
clap = { version = "4.0.29", features = ["derive"] }
members = [
"aoc22-clap",
"aoc"
]

6
aoc/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "aoc"
version = "2022.1.0"
edition = "2021"
[dependencies]

4
aoc/src/lib.rs Normal file
View file

@ -0,0 +1,4 @@
pub mod year2022;
pub mod util;
pub use year2022::*;

9
aoc22-clap/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "aoc22-clap"
version = "2022.1.0"
edition = "2021"
[dependencies]
clap = { version = "4.0.29", features = ["derive"] }
aoc = {path= "../aoc"}

View file

@ -1,6 +1,5 @@
mod commands;
use clap::{arg, Parser, Subcommand};
use commands::*;
use aoc::*;
//use std::ffi::OsString;
use std::path::PathBuf;

View file

@ -1,4 +1,3 @@
pub mod util;
mod cli;
use cli::execute_cli;