|
| 1 | +load("@prelude//rust:cargo_package.bzl", "cargo") |
| 2 | + |
| 3 | +# package definitions |
| 4 | +filegroup( |
| 5 | + name = "sensleak-0.2.1.crate", |
| 6 | + srcs = glob(["src/**/*.rs"]), |
| 7 | +) |
| 8 | + |
| 9 | +pkg_deps = [ |
| 10 | + "//third-party:assert_cmd", |
| 11 | + "//third-party:axum", |
| 12 | + "//third-party:chrono", |
| 13 | + "//third-party:clap", |
| 14 | + "//third-party:csv", |
| 15 | + "//third-party:env_logger", |
| 16 | + "//third-party:git2", |
| 17 | + "//third-party:hyper", |
| 18 | + "//third-party:log", |
| 19 | + "//third-party:mockito", |
| 20 | + "//third-party:postgres", |
| 21 | + "//third-party:rayon", |
| 22 | + "//third-party:regex", |
| 23 | + "//third-party:sea-orm", |
| 24 | + "//third-party:serde", |
| 25 | + "//third-party:serde_json", |
| 26 | + "//third-party:tempfile", |
| 27 | + "//third-party:tokio", |
| 28 | + "//third-party:toml", |
| 29 | + "//third-party:tower-http", |
| 30 | + "//third-party:utoipa", |
| 31 | + "//third-party:utoipa-swagger-ui", |
| 32 | + "//third-party:walkdir", |
| 33 | +] |
| 34 | + |
| 35 | +# targets |
| 36 | +cargo.rust_library( |
| 37 | + name = "sensleak", |
| 38 | + srcs = [":sensleak-0.2.1.crate"], |
| 39 | + crate_root = "sensleak-0.2.1.crate/src/lib.rs", |
| 40 | + edition = "2021", |
| 41 | + deps = pkg_deps, |
| 42 | + visibility = ["PUBLIC"], |
| 43 | +) |
| 44 | + |
| 45 | +cargo.rust_binary( |
| 46 | + name = "api", |
| 47 | + srcs = [":sensleak-0.2.1.crate"], |
| 48 | + crate_root = "sensleak-0.2.1.crate/src/api.rs", |
| 49 | + edition = "2021", |
| 50 | + deps = [":sensleak"] + pkg_deps, |
| 51 | + visibility = ["PUBLIC"], |
| 52 | +) |
| 53 | + |
| 54 | +cargo.rust_binary( |
| 55 | + name = "scan", |
| 56 | + srcs = [":sensleak-0.2.1.crate"], |
| 57 | + crate_root = "sensleak-0.2.1.crate/src/main.rs", |
| 58 | + edition = "2021", |
| 59 | + deps = [":sensleak"] + pkg_deps, |
| 60 | + visibility = ["PUBLIC"], |
| 61 | +) |
0 commit comments