"""Build file for rialo-feature-management-program-interface."""

load("@crates//:defs.bzl", "aliases", "all_crate_deps")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

# Export Cargo.toml for crate_universe
exports_files(["Cargo.toml"])

rust_library(
    name = "rialo-feature-management-program-interface",
    srcs = glob(["src/**/*.rs"]),
    aliases = aliases(),
    compile_data = ["Cargo.toml"],
    crate_name = "rialo_feature_management_interface",
    edition = "2021",
    proc_macro_deps = all_crate_deps(proc_macro = True),
    deps = [
        "//developer-frameworks/sdk/rialo-s-instruction:rialo-s-instruction",
        "//developer-frameworks/sdk/rialo-s-program-error:rialo-s-program-error",
        "//developer-frameworks/sdk/rialo-s-pubkey:rialo-s-pubkey",
    ] + all_crate_deps(normal = True),
)

rust_test(
    name = "rialo-feature-management-program-interface-test",
    aliases = aliases(),
    crate = ":rialo-feature-management-program-interface",
    edition = "2021",
    proc_macro_deps = all_crate_deps(
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//developer-frameworks/sdk/rialo-s-instruction:rialo-s-instruction",
        "//developer-frameworks/sdk/rialo-s-keypair:rialo-s-keypair",
        "//developer-frameworks/sdk/rialo-s-program-error:rialo-s-program-error",
        "//developer-frameworks/sdk/rialo-s-pubkey:rialo-s-pubkey",
        "//developer-frameworks/sdk/rialo-s-signer:rialo-s-signer",
    ] + all_crate_deps(
        normal = True,
        normal_dev = True,
    ),
)
