BUCKannotatedBUCKsource44 lines · 1.8 kB · raw

rledger with buck2: rustledger's own src/bin/rledger.rs, compiled against the libraries reindeer built (third-party/rledger), as README.md says.

The same crate archive third-party/rledger/BUCK pins (name, checksum and all); a new rustledger version changes both, and buck2 build //rledger:rledger fails loudly on a mismatched checksum before it builds anything.

7http_archive(
8    name = "rustledger-src",
9    sha256 = "7bb96a4e5df7ac6ea583b698475fa1ca96e6424a6476b2e15422f176705e49ca",
10    strip_prefix = "rustledger-0.24.0",
11    urls = ["https://static.crates.io/crates/rustledger/0.24.0/download"],
12)
14rust_binary(
15    name = "rledger",
16    srcs = [":rustledger-src"],
17    crate = "rledger",
18    crate_root = "rustledger-src/src/bin/rledger.rs",
19    edition = "2024",
20    env = {
21        "CARGO_BIN_NAME": "rledger",
22        "CARGO_CRATE_NAME": "rledger",
23        "CARGO_MANIFEST_DIR": "rustledger-src",
24        "CARGO_PKG_AUTHORS": "Rustledger Contributors",
25        "CARGO_PKG_DESCRIPTION": "Drop-in replacement for Beancount. Pure Rust, 10-30x faster.",
26        "CARGO_PKG_HOMEPAGE": "https://rustledger.github.io",
27        "CARGO_PKG_NAME": "rustledger",
28        "CARGO_PKG_REPOSITORY": "https://github.com/rustledger/rustledger",
29        "CARGO_PKG_VERSION": "0.24.0",
30        "CARGO_PKG_VERSION_MAJOR": "0",
31        "CARGO_PKG_VERSION_MINOR": "24",
32        "CARGO_PKG_VERSION_PATCH": "0",
33        "CARGO_PKG_VERSION_PRE": "",
34    },
35    deps = [
36        "//third-party/rledger:anyhow",
37        "//third-party/rledger:clap",
38        "//third-party/rledger:clap_complete",
39        "//third-party/rledger:dirs",
40        "//third-party/rledger:rustledger",
41        "//third-party/rledger:rustledger-plugin",
42    ],
43    visibility = ["PUBLIC"],
44)