sparta 0.1.2

SPARTA is a library of software components specially designed for building high-performance static analyzers based on the theory of Abstract Interpretation.
Documentation
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")
load("@fbcode_macros//build_defs:rust_unittest.bzl", "rust_unittest")

rust_library(
    name = "sparta",
    srcs = glob(["src/**/*.rs"]),
    features = [
        "const_generics",
    ],
    test_deps = [
        "fbsource//third-party/rust:rand",
    ],
    visibility = ["PUBLIC"],
    deps = [
        "fbsource//third-party/rust:im",
        "fbsource//third-party/rust:petgraph",
        "fbsource//third-party/rust:smallvec",
        "fbsource//xplat/sparta/rust-proc-macros:sparta-proc-macros",
    ],
)

rust_unittest(
    name = "graph_test",
    # Turn common mod into a library will break `cargo test`,
    # so let's manually put them into srcs for now.
    srcs = [
        "tests/common/graph.rs",
        "tests/common/mod.rs",
        "tests/graph_test.rs",
    ],
    framework = True,
    deps = [
        "fbsource//third-party/rust:smallvec",
        ":sparta",
    ],
)

rust_unittest(
    name = "wpo_test",
    srcs = [
        "tests/common/graph.rs",
        "tests/common/mod.rs",
        "tests/wpo_test.rs",
    ],
    framework = True,
    deps = [
        "fbsource//third-party/rust:smallvec",
        ":sparta",
    ],
)

rust_unittest(
    name = "fixpoint_iter_test",
    srcs = ["tests/fixpoint_iter_test.rs"],
    framework = True,
    deps = [
        "fbsource//third-party/rust:im",
        "fbsource//third-party/rust:smallvec",
        ":sparta",
    ],
)

rust_unittest(
    name = "disjoint_union_test",
    srcs = ["tests/datatype/disjoint_union_test.rs"],
    framework = True,
    deps = [
        ":sparta",
    ],
)

rust_unittest(
    name = "abstract_partition_test",
    srcs = ["tests/abstract_partition_test.rs"],
    framework = True,
    deps = [
        "fbsource//third-party/rust:im",
        ":sparta",
    ],
)