From 77fd19575962369c2cff7095e030a4ab093c6dc4 Mon Sep 17 00:00:00 2001 From: Candifloss Date: Sat, 13 Dec 2025 22:03:07 +0530 Subject: [PATCH] Init workspace and crates --- .gitignore | 3 +++ Cargo.toml | 8 ++++++++ glock-conf/Cargo.toml | 10 ++++++++++ glock-conf/src/lib.rs | 14 ++++++++++++++ glock-d/Cargo.toml | 8 ++++++++ glock-d/src/main.rs | 3 +++ glock/Cargo.toml | 8 ++++++++ glock/src/main.rs | 3 +++ 8 files changed, 57 insertions(+) create mode 100644 Cargo.toml create mode 100644 glock-conf/Cargo.toml create mode 100644 glock-conf/src/lib.rs create mode 100644 glock-d/Cargo.toml create mode 100644 glock-d/src/main.rs create mode 100644 glock/Cargo.toml create mode 100644 glock/src/main.rs diff --git a/.gitignore b/.gitignore index ab951f8..870b4ad 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ Cargo.lock # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +# Added by Candifloss +test/ \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..cb65af7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[workspace] +members = [ + "glock-conf", + "glock-d", + "glock", +] + +resolver = "3" diff --git a/glock-conf/Cargo.toml b/glock-conf/Cargo.toml new file mode 100644 index 0000000..92933ac --- /dev/null +++ b/glock-conf/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "glock-conf" +version = "0.1.0" +edition = "2024" +description = "Configurations for glock screenlock tool" + +[dependencies] +serde = { version = "1.0.228", features = ["derive"] } +thiserror = "2.0.17" +toml = "0.9.8" diff --git a/glock-conf/src/lib.rs b/glock-conf/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/glock-conf/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/glock-d/Cargo.toml b/glock-d/Cargo.toml new file mode 100644 index 0000000..690d0e4 --- /dev/null +++ b/glock-d/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "glock-d" +version = "0.1.0" +edition = "2024" +description = "Screen idle time tracker daemon for glock screenlock" + +[dependencies] +glock-conf = { version = "0.1.0", path = "../glock-conf" } diff --git a/glock-d/src/main.rs b/glock-d/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/glock-d/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/glock/Cargo.toml b/glock/Cargo.toml new file mode 100644 index 0000000..54f22cf --- /dev/null +++ b/glock/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "glock" +version = "0.1.0" +edition = "2024" +description = "Screen locker for your desktop" + +[dependencies] +glock-conf = { version = "0.1.0", path = "../glock-conf" } diff --git a/glock/src/main.rs b/glock/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/glock/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}