Init workspace and crates

This commit is contained in:
Candifloss 2025-12-13 22:03:07 +05:30
parent af55b526dc
commit 77fd195759
8 changed files with 57 additions and 0 deletions

3
.gitignore vendored
View File

@ -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/

8
Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[workspace]
members = [
"glock-conf",
"glock-d",
"glock",
]
resolver = "3"

10
glock-conf/Cargo.toml Normal file
View File

@ -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"

14
glock-conf/src/lib.rs Normal file
View File

@ -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);
}
}

8
glock-d/Cargo.toml Normal file
View File

@ -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" }

3
glock-d/src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

8
glock/Cargo.toml Normal file
View File

@ -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" }

3
glock/src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}