BUCKannotatedBUCKsource41 lines · 1.0 KB · raw
1# The host side of zbanks/alttp in C: assert_bp's trap handler and readers
2# of the bot's goal/task lists for the panels (shim/host.c). Separate from
3# //third-party/c:zbanks-alttp so upstream's sources stay exactly upstream's.
4cxx_library(
5    name = "shim",
6    srcs = ["shim/host.c"],
7    compiler_flags = [
8        "-O2",
9        "-std=c11",
10        "-fcommon",
11    ],
12    deps = ["//third-party/c:zbanks-alttp"],
13)
14
15_DEPS = [
16    ":shim",
17    "//packages/alttp:alttp",
18    "//packages/console:console",
19    "//third-party/c:zbanks-alttp",
20    "//third-party/rust:serde",
21    "//third-party/rust:serde_json",
22]
23
24rust_library(
25    name = "zbanks",
26    srcs = glob(["src/**/*.rs"]),
27    crate_root = "src/lib.rs",
28    edition = "2024",
29    deps = _DEPS,
30    visibility = ["PUBLIC"],
31)
32
33# `src/stall.rs` and `src/recovery.rs`'s own `#[cfg(test)]` modules: pure
34# state machines, no window, no bot, no buck2 features here.
35rust_test(
36    name = "test",
37    srcs = glob(["src/**/*.rs"]),
38    crate_root = "src/lib.rs",
39    edition = "2024",
40    deps = _DEPS,
41)