load("@crates//:defs.bzl", "aliases", "all_crate_deps")

load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_proc_macro", "rust_test")



filegroup(

    name = "cargo_manifest",

    srcs = ["Cargo.toml"],

    visibility = ["//visibility:public"],

)



filegroup(

    name = "package_runfiles",

    srcs = glob(["Cargo.toml", "**/*"], exclude = ["BUILD", "BUILD.bazel"], allow_empty = True),

    visibility = ["//visibility:public"],

)



rust_library(
    name = "meerkat_machine_schema",
    aliases = aliases(package_name = "meerkat-machine-schema"),
    crate_name = "meerkat_machine_schema",
    crate_root = "src/lib.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = glob(["src/**/*.rs"]),
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
    ),
)

rust_library(
    name = "meerkat_machine_schema_agent_factory_build",
    aliases = aliases(package_name = "meerkat-machine-schema"),
    crate_name = "meerkat_machine_schema",
    crate_root = "src/lib.rs",
    crate_features = [],
    edition = "2024",
    rustc_flags = ["-Copt-level=0"],
    compile_data = [
        "Cargo.toml",
    ],
    srcs = glob(["src/**/*.rs"]),
    visibility = [
        "//meerkat:__pkg__",
    ],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
    ),
    deps = [
        "//meerkat:meerkat_core_agent_factory_build",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
    ),
)

rust_test(
    name = "meerkat_machine_schema_unit_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "meerkat_machine_schema",
    crate_root = "src/lib.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = glob(["src/**/*.rs"]),
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
        "unit",
    ],
    size = "small",
    data = [
        ":package_runfiles",
    ],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "auth_machine_oauth_flow_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "auth_machine_oauth_flow",
    crate_root = "tests/auth_machine_oauth_flow.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/auth_machine_oauth_flow.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "auth_machine_oauth_flow",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "auth_machine_release_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "auth_machine_release",
    crate_root = "tests/auth_machine_release.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/auth_machine_release.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "auth_machine_release",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "catalog_typed_round_trip_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "catalog_typed_round_trip",
    crate_root = "tests/catalog_typed_round_trip.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/catalog_typed_round_trip.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "catalog_typed_round_trip",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "docs_machine_authority_alignment_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "docs_machine_authority_alignment",
    crate_root = "tests/docs_machine_authority_alignment.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/docs_machine_authority_alignment.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "docs_machine_authority_alignment",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [
        ":package_runfiles",
    ],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "identity_roundtrip_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "identity_roundtrip",
    crate_root = "tests/identity_roundtrip.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/identity_roundtrip.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "identity_roundtrip",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "named_type_binding_covers_catalog_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "named_type_binding_covers_catalog",
    crate_root = "tests/named_type_binding_covers_catalog.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/named_type_binding_covers_catalog.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "named_type_binding_covers_catalog",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "peer_endpoint_structural_equivalence_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "peer_endpoint_structural_equivalence",
    crate_root = "tests/peer_endpoint_structural_equivalence.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/peer_endpoint_structural_equivalence.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "peer_endpoint_structural_equivalence",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

rust_test(
    name = "schema_contracts_test",
    aliases = aliases(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
        proc_macro = True,
        proc_macro_dev = True,
    ),
    crate_name = "schema_contracts",
    crate_root = "tests/schema_contracts.rs",
    crate_features = [],
    edition = "2024",
    compile_data = [
        "Cargo.toml",
    ],
    srcs = [
        "tests/schema_contracts.rs",
    ],
    visibility = ["//visibility:public"],
    rustc_env = {
        "CARGO_PKG_VERSION": "0.7.8",
        "CARGO_BIN_NAME": "schema_contracts",
        "CARGO_MANIFEST_DIR": "./meerkat-machine-schema",
    },
    tags = [
        "fast",
    ],
    size = "small",
    data = [
        "//meerkat-core:package_runfiles",
        "//meerkat-mcp:package_runfiles",
        "//meerkat-runtime:package_runfiles",
    ],
    env = {
        "RUST_MIN_STACK": "16777216",
    },
    proc_macro_deps = [
        "//meerkat-machine-dsl:meerkat_machine_dsl",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//meerkat-core:meerkat_core",
        "//meerkat-machine-schema:meerkat_machine_schema",
    ] + all_crate_deps(
        package_name = "meerkat-machine-schema",
        normal = True,
        normal_dev = True,
    ),
)

test_suite(
    name = "fast_tests",
    tests = [
        ":auth_machine_oauth_flow_test",
        ":auth_machine_release_test",
        ":catalog_typed_round_trip_test",
        ":docs_machine_authority_alignment_test",
        ":identity_roundtrip_test",
        ":meerkat_machine_schema_unit_test",
        ":named_type_binding_covers_catalog_test",
        ":peer_endpoint_structural_equivalence_test",
        ":schema_contracts_test",
    ],
)
