load("@prelude//platforms:defs.bzl", "host_configuration")

# Converts a RISC-V ELF shared object into a PE/COFF `.efi` executable.
rust_binary(
    name = "riscv-elf2efi",
    srcs = glob(["src/**/*.rs"]),
    crate_root = "src/main.rs",
    deps = [
        # third-party dependencies
        "//third-party:anyhow",
        "//third-party:object",
        "//third-party:clap",
        "//third-party:memmap2",
    ],
    target_compatible_with = [host_configuration.os, host_configuration.cpu],
    visibility = ["PUBLIC"],
)
