Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jul 29, 2024
1 parent 0f04f39 commit 7be410b
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

!/Target/release/*.deb
!/Target/release/*.exe
!/Target/release/PRun
!/Target/release/Run
!/Target/release/PSummary
!/Target/release/Summary
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Exclude certain files or directories (defailt is

Specify a custom pattern for matching (defailt is `.git`)

#### --Separator:

Define a custom separator

## Dependencies

`Summary` relies on several Rust crates to provide its functionality:
Expand Down
34 changes: 34 additions & 0 deletions Source/Struct/Binary/Command.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pub struct Struct {
pub Separator: Option::Separator,
pub Fn: Box<dyn Fn() -> Pin<Box<dyn Future<Output = ()> + Send + 'static>> + Send + 'static>,
}

impl Struct {
pub fn Fn() -> Self {
Self {
Separator: std::path::MAIN_SEPARATOR,
Fn: Box::new(|| {
Box::pin(async move {
let Option = Entry::Struct::Fn(&Option::Struct::Fn(Struct::Fn()));

match Option.Parallel {
true => {
Parallel::Fn(Option).await;
}
false => {
Sequential::Fn(Option);
}
};
})
}),
}
}
}

pub mod Entry;
pub mod Option;

use crate::Fn::Binary::Command::{Parallel, Sequential};

Check failure on line 31 in Source/Struct/Binary/Command.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

unresolved imports `crate::Fn::Binary::Command::Parallel`, `crate::Fn::Binary::Command::Sequential`

Check failure on line 31 in Source/Struct/Binary/Command.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

unresolved imports `crate::Fn::Binary::Command::Parallel`, `crate::Fn::Binary::Command::Sequential`

use futures::Future;
use std::pin::Pin;
25 changes: 25 additions & 0 deletions Source/Struct/Binary/Command/Entry.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pub type Type = Vec<Vec<String>>;

pub struct Struct {
pub Command: Command,
pub Entry: Type,
pub Parallel: Parallel,
pub Pattern: Pattern,
pub Separator: Separator,
}

impl Struct {
pub fn Fn(Option: &Option) -> Self {
Self {
Command: Option.Command.clone(),

Check failure on line 14 in Source/Struct/Binary/Command/Entry.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

no field `Command` on type `&Struct::Binary::Command::Option::Struct`

Check failure on line 14 in Source/Struct/Binary/Command/Entry.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

no field `Command` on type `&Struct::Binary::Command::Option::Struct`
Entry: crate::Fn::Binary::Command::Entry::Fn(Option),

Check failure on line 15 in Source/Struct/Binary/Command/Entry.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

failed to resolve: could not find `Entry` in `Command`

Check failure on line 15 in Source/Struct/Binary/Command/Entry.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

failed to resolve: could not find `Entry` in `Command`
Parallel: Option.Parallel,
Pattern: Option.Pattern.clone(),
Separator: Option.Separator,
}
}
}

use crate::Struct::Binary::Command::Option::{
Command, Parallel, Pattern, Separator, Struct as Option,
};
37 changes: 37 additions & 0 deletions Source/Struct/Binary/Command/Option.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pub type Command = Vec<String>;

pub type Parallel = bool;
pub type Pattern = String;
pub type Separator = char;

pub struct Struct {
pub Exclude: Vec<String>,
pub Parallel: Parallel,
pub Pattern: Pattern,
pub Root: String,
pub Separator: Separator,
}

impl Struct {
pub fn Fn(Option { Separator, .. }: Option) -> Self {
Self {
Parallel: Fn().get_flag("Parallel"),
Root: Fn().get_one::<String>("Root").expect("Cannot Root.").to_owned(),
Exclude: Fn()
.get_one::<String>("Exclude")
.expect("Cannot Exclude.")
.split(" ")
.map(|Command| Command.to_string())
.collect::<Vec<_>>(),
Pattern: Fn().get_one::<String>("Pattern").expect("Cannot Pattern.").to_owned(),
Command: Fn()

Check failure on line 27 in Source/Struct/Binary/Command/Option.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

struct `Struct::Binary::Command::Option::Struct` has no field named `Command`

Check failure on line 27 in Source/Struct/Binary/Command/Option.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

struct `Struct::Binary::Command::Option::Struct` has no field named `Command`
.get_many::<String>("Command")
.expect("Cannot Command.")
.map(|Command| Command.to_string())
.collect::<Vec<_>>(),
Separator,
}
}
}

use crate::{Fn::Binary::Command::Fn, Struct::Binary::Command::Struct as Option};

Check failure on line 37 in Source/Struct/Binary/Command/Option.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

unresolved import `crate::Fn::Binary::Command::Fn`

Check failure on line 37 in Source/Struct/Binary/Command/Option.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

unresolved import `crate::Fn::Binary::Command::Fn`
1 change: 1 addition & 0 deletions Source/Struct/Binary/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod Command;
1 change: 1 addition & 0 deletions Source/Struct/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod Binary;
2 changes: 1 addition & 1 deletion target/.rustc_info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"rustc_fingerprint":8489967503101715510,"outputs":{"15611795083382425170":{"success":true,"status":"","code":0,"stdout":"rustc 1.82.0-nightly (c1a6199e9 2024-07-24)\nbinary: rustc\ncommit-hash: c1a6199e9d92bb785c17a6d7ffd8b8b552f79c10\ncommit-date: 2024-07-24\nhost: x86_64-pc-windows-msvc\nrelease: 1.82.0-nightly\nLLVM version: 18.1.7\n","stderr":""},"16202457509552398077":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"1185988223601034215":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Nikola\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"lahfsahf\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nub_checks\nwindows\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":9035159094269925662,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Nikola\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"lahfsahf\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nub_checks\nwindows\n","stderr":""},"14305839045545480886":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"12744816824612481171":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Nikola\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"lahfsahf\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nub_checks\nwindows\n","stderr":""},"16495917692426387086":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.82.0-nightly (c1a6199e9 2024-07-24)\nbinary: rustc\ncommit-hash: c1a6199e9d92bb785c17a6d7ffd8b8b552f79c10\ncommit-date: 2024-07-24\nhost: x86_64-pc-windows-msvc\nrelease: 1.82.0-nightly\nLLVM version: 18.1.7\n","stderr":""}},"successes":{}}

0 comments on commit 7be410b

Please sign in to comment.