diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-02-01 22:42:11 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-02-01 22:42:11 +0100 |
| commit | d780391408b9e6d443e5e4f907748cae484b79fb (patch) | |
| tree | d961efd62478248081d1a327c818d6fa171f0a2d /server/Cargo.toml | |
| parent | 05b674190f26e2a58cc7b7288586c031552d50f3 (diff) | |
Use workspace instead of features
Having to include --feature=build-server in basically all commands
that wasn't building eyeballs-githook got tiring quickly.
Instead, use workspaces, with a separate project for building
the githook. It means I also had to add a library common with
code shared by both githook and server.
Diffstat (limited to 'server/Cargo.toml')
| -rw-r--r-- | server/Cargo.toml | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/server/Cargo.toml b/server/Cargo.toml index 64d6796..9288bc2 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -2,38 +2,32 @@ name = "eyeballs" version = "0.1.0" edition = "2021" -default-run = "eyeballs" -[dependencies] -# Used by all binaries, either because its needed or because the library is small enough I don't care -anyhow = "1.0" +[workspace] +members = ["hook"] +resolver = "2" + +[workspace.dependencies] futures = "0.3.31" -pathdiff = "0.2.3" rmp-serde = "1.3" serde = { version = "1.0", features = ["derive"] } -time = "0.3.34" -tokio = { version = "1", features = ["full"] } +tokio = { version = "1" } -# Optional dependencies, listed in features -ldap3 = { version = "0.11.5", default-features = false, features = [ "native-tls", "tls", "tls-native", "tokio-native-tls" ], optional = true } -rocket = { version = "0.5.1", features = ["json", "secrets"], optional = true } -rocket_db_pools = { version = "0.2.0", features = ["sqlx_mysql"], optional = true } -sqlx = { version = "0.7.0", default-features = false, features = ["macros", "migrate"], optional = true } -utoipa = { version = "5", features = ["rocket_extras"], optional = true } -utoipa-swagger-ui = { version = "9", features = ["rocket", "vendored"], default-features = false, optional = true } +[dependencies] +anyhow = "1.0" +eyeballs-common = { path = "common" } +futures.workspace = true +ldap3 = { version = "0.11.5", default-features = false, features = [ "native-tls", "tls", "tls-native", "tokio-native-tls" ] } +rmp-serde.workspace = true +rocket = { version = "0.5.1", features = ["json", "secrets"] } +rocket_db_pools = { version = "0.2.0", features = ["sqlx_mysql"] } +serde.workspace = true +sqlx = { version = "0.7.0", default-features = false, features = ["macros", "migrate"] } +time = "0.3.34" +tokio = { workspace = true, features = ["process"] } +utoipa = { version = "5", features = ["rocket_extras"] } +utoipa-swagger-ui = { version = "9", features = ["rocket", "vendored"], default-features = false } [dev-dependencies] stdext = "0.3.3" testdir = "0.9.3" - -[features] -build-server = ["ldap3", "rocket", "rocket_db_pools", "sqlx", "utoipa", "utoipa-swagger-ui"] - -[[bin]] -name = "eyeballs" -path = "src/main.rs" -required-features = ["build-server"] - -[[bin]] -name = "eyeballs-githook" -path = "src/githook.rs" |
