load("//eden/scm:targets.bzl", "sl_rust_library")

oncall("sapling")

sl_rust_library(
    name = "drawdag",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {
        "cargo_toml_config": {
            "package": {
                "description": "Parse an ASCII DAG into graph edges.",
                "homepage": "https://sapling-scm.com/docs/dev/internals/drawdag",
            },
        },
    },
    crate_root = "src/lib.rs",
    # A test inside this target is using #[should_panic], setting the backtrace
    # to false here, otherwise the test binary will try to extract the backtrace
    # and the test will fail with leak sanitizer.
    test_env = {"RUST_BACKTRACE": "0"},
    test_labels = ["tpx-rust-no-backtrace-workaround"],
)
