"""Build file for rialo-api-types."""

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-api-types",
    srcs = glob(["src/**/*.rs"]),
    aliases = aliases(),
    compile_data = ["README.md"],
    crate_name = "rialo_api_types",
    edition = "2021",
    proc_macro_deps = all_crate_deps(proc_macro = True),
    deps = [
        "//foundation/types/rialo-shared-types:rialo-shared-types",
        "//foundation/types/rialo-types:rialo-types",
        "//developer-frameworks/sdk/rialo-s-message:rialo-s-message",
        "//developer-frameworks/sdk/rialo-s-sdk:rialo-s-sdk",
    ] + all_crate_deps(normal = True),
)

rust_test(
    name = "rialo-api-types-test",
    aliases = aliases(),
    crate = ":rialo-api-types",
    edition = "2021",
    proc_macro_deps = all_crate_deps(
        proc_macro = True,
        proc_macro_dev = True,
    ),
    deps = [
        "//foundation/types/rialo-shared-types:rialo-shared-types",
        "//foundation/types/rialo-types:rialo-types",
        "//developer-frameworks/sdk/rialo-s-message:rialo-s-message",
        "//developer-frameworks/sdk/rialo-s-sdk:rialo-s-sdk",
    ] + all_crate_deps(
        normal = True,
        normal_dev = True,
    ),
)
