BUCKannotatedBUCKsource23 lines · 853 B · raw
1load("//build:defs.bzl", "first_party_binary", "pg_major_select")
2
3first_party_binary(
4    name = "record-gates",
5    srcs = glob(["src/**/*.rs"]),
6    crate_root = "src/main.rs",
7    # Compile-time, read by `--send` (src/send.rs): the same values
8    # tests/BUCK gives the integration tests.
9    env = pg_major_select(lambda m: {
10        "POSTJEVSQL_EXT": "$(location //crates/postjevsql:ext)",
11        "POSTJEVSQL_PG_MAJOR": m,
12        "POSTJEVSQL_POSTGRES_BIN": read_config("postjevsql", "postgres_bin_" + m, read_config("postjevsql", "postgres_bin")),
13    }),
14    deps = [
15        "//third-party:jev-mock",
16        "//third-party:jev-protocol",
17        "//crates/postjevsql-core:postjevsql-core",
18        "//tests/support:support",
19        "//third-party:serde_json",
20        "//third-party:tokio",
21        "//third-party:tokio-postgres",
22    ],
23)