load("@atc_router_crate_index//:defs.bzl", "aliases", "all_crate_deps")
load("@rules_rust//rust:defs.bzl", "rust_shared_library")

filegroup(
    name = "rust_srcs",
    srcs = glob([
        "src/**/*.rs",
    ]),
)

filegroup(
    name = "lualib_srcs",
    srcs = glob([
        "lualib/**/*.lua",
        "lib/**/*.lua",
    ]),
    visibility = ["//visibility:public"],
)

rust_shared_library(
    name = "atc_router",
    srcs = [":rust_srcs"],
    aliases = aliases(),
    crate_features = [
        "default",
        "ffi",
    ],
    proc_macro_deps = all_crate_deps(
        proc_macro = True,
    ),
    rustc_flags = [
        "--codegen=strip=symbols",
    ],
    visibility = ["//visibility:public"],
    deps = all_crate_deps(
        normal = True,
    ),
)
