Initialize Workspace

- First crates
- First `Cargo.toml`s
This commit is contained in:
Candifloss 2026-06-14 20:25:01 +05:30
parent 69e44982b9
commit 8b00099bc8
10 changed files with 98 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/
# Manually added
/scratchpad/

18
Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[workspace]
resolver = "3"
members = [
"crates/config","crates/ldap","crates/password",
"tools/lk-pswdreset"
]
[workspace.package]
edition = "2024"
license = "GPL-3.0-or-later"
repository = "https://git.candifloss.cc/candifloss/ldap-kit.git"
[workspace.dependencies]
anyhow = "1.0.102"
clap = { workspace = true, features = ["derive"] }
ldap3 = "0.12.1"
serde = { version = "1.0.228", features = ["derive"] }
toml = "1.1.2"

8
crates/config/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "config"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies]

14
crates/config/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
crates/ldap/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "ldap"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies]

14
crates/ldap/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);
}
}

View File

@ -0,0 +1,8 @@
[package]
name = "password"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies]

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

View File

@ -0,0 +1,8 @@
[package]
name = "lk-pswdreset"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[dependencies]

View File

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