Adam Snaider | 0967b81 | 2023-11-02 15:29:43 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library") |
Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 2 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 3 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 4 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 5 | load("//tools/build_rules:autocxx.bzl", "autocxx_library") |
Austin Schuh | 605d5ff | 2024-05-10 15:59:54 -0700 | [diff] [blame] | 6 | load("//tools/build_rules:select.bzl", "compiler_select") |
Adam Snaider | f560ae9 | 2023-11-07 17:06:21 -0800 | [diff] [blame] | 7 | load("//tools/rust:defs.bzl", "flatbuffer_rust_library", "rust_library") |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 8 | |
Austin Schuh | 00e302a | 2020-12-21 11:53:30 -0800 | [diff] [blame] | 9 | exports_files(["aos_dump_autocomplete.sh"]) |
| 10 | |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 11 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 12 | name = "prime_binaries", |
| 13 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 14 | "//aos:aos_dump", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 15 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 16 | "//aos:aos_send", |
Austin Schuh | 91d8d06 | 2020-11-02 17:11:13 -0800 | [diff] [blame] | 17 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 18 | ], |
| 19 | visibility = ["//visibility:public"], |
Austin Schuh | 1eceeb9 | 2015-11-08 21:16:06 -0800 | [diff] [blame] | 20 | ) |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 21 | |
| 22 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 23 | name = "prime_start_binaries", |
| 24 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 25 | "//aos/events/logging:logger_main", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 26 | ], |
| 27 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 28 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 29 | |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 30 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 31 | name = "prime_binaries_stripped", |
| 32 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 33 | "//aos:aos_dump.stripped", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 34 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 35 | "//aos:aos_send.stripped", |
Austin Schuh | 44e0b14 | 2021-10-16 15:51:10 -0700 | [diff] [blame] | 36 | "//aos/starter:starter_stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 37 | ], |
| 38 | visibility = ["//visibility:public"], |
| 39 | ) |
| 40 | |
| 41 | filegroup( |
| 42 | name = "prime_start_binaries_stripped", |
| 43 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 44 | "//aos/events/logging:logger_main.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 45 | ], |
| 46 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 47 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 48 | |
| 49 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 50 | name = "math", |
| 51 | hdrs = [ |
| 52 | "commonmath.h", |
| 53 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 54 | visibility = ["//visibility:public"], |
| 55 | ) |
| 56 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 57 | py_library( |
| 58 | name = "python_init", |
| 59 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 60 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 61 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 62 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 63 | |
| 64 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 65 | name = "macros", |
| 66 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 67 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 68 | ], |
| 69 | visibility = ["//visibility:public"], |
| 70 | ) |
| 71 | |
| 72 | cc_library( |
| 73 | name = "gtest_prod", |
| 74 | hdrs = [ |
| 75 | "gtest_prod.h", |
| 76 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 77 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 78 | visibility = ["//visibility:public"], |
| 79 | ) |
| 80 | |
| 81 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 82 | name = "unique_malloc_ptr", |
| 83 | hdrs = [ |
| 84 | "unique_malloc_ptr.h", |
| 85 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 86 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 87 | visibility = ["//visibility:public"], |
| 88 | ) |
| 89 | |
| 90 | cc_library( |
| 91 | name = "condition", |
| 92 | srcs = [ |
| 93 | "condition.cc", |
| 94 | ], |
| 95 | hdrs = [ |
| 96 | "condition.h", |
| 97 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 98 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 99 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 100 | deps = [ |
| 101 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 102 | "//aos/mutex", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 103 | "@com_google_absl//absl/log", |
| 104 | "@com_google_absl//absl/log:check", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 105 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 106 | ) |
| 107 | |
| 108 | cc_test( |
| 109 | name = "condition_test", |
| 110 | srcs = [ |
| 111 | "condition_test.cc", |
| 112 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 113 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 114 | deps = [ |
| 115 | ":condition", |
| 116 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 117 | "//aos/ipc_lib:aos_sync", |
| 118 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 119 | "//aos/logging", |
| 120 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 121 | "//aos/testing:googletest", |
| 122 | "//aos/testing:prevent_exit", |
| 123 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 124 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 125 | ], |
| 126 | ) |
| 127 | |
| 128 | cc_library( |
| 129 | name = "die", |
| 130 | srcs = [ |
| 131 | "die.cc", |
| 132 | ], |
| 133 | hdrs = [ |
| 134 | "die.h", |
| 135 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 136 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 137 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 138 | deps = [ |
| 139 | "//aos:macros", |
| 140 | "//aos/libc:aos_strerror", |
| 141 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 142 | ) |
| 143 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 144 | cc_test( |
| 145 | name = "die_test", |
| 146 | srcs = [ |
| 147 | "die_test.cc", |
| 148 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 149 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 150 | deps = [ |
| 151 | ":die", |
| 152 | "//aos/testing:googletest", |
| 153 | ], |
| 154 | ) |
| 155 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 156 | cc_binary( |
| 157 | name = "dump_rtprio", |
| 158 | srcs = [ |
| 159 | "dump_rtprio.cc", |
| 160 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 161 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 162 | deps = [ |
Austin Schuh | 1405618 | 2023-01-03 21:19:38 -0800 | [diff] [blame] | 163 | "//aos:init", |
| 164 | "//aos/events:shm_event_loop", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 165 | "//aos/time", |
Austin Schuh | 1405618 | 2023-01-03 21:19:38 -0800 | [diff] [blame] | 166 | "//aos/util:top", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 167 | "@com_google_absl//absl/log", |
| 168 | "@com_google_absl//absl/log:check", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 169 | ], |
| 170 | ) |
| 171 | |
| 172 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 173 | name = "init", |
| 174 | srcs = [ |
| 175 | "init.cc", |
| 176 | ], |
| 177 | hdrs = [ |
| 178 | "init.h", |
| 179 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 180 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 181 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 182 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 183 | ":realtime", |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 184 | ":uuid", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 185 | "//aos:die", |
Austin Schuh | fc0caa8 | 2023-08-25 14:25:03 -0700 | [diff] [blame] | 186 | "//aos/logging", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 187 | "@com_google_absl//absl/debugging:failure_signal_handler", |
| 188 | "@com_google_absl//absl/flags:flag", |
| 189 | "@com_google_absl//absl/flags:parse", |
| 190 | "@com_google_absl//absl/log", |
| 191 | "@com_google_absl//absl/log:check", |
| 192 | "@com_google_absl//absl/log:flags", |
| 193 | "@com_google_absl//absl/log:globals", |
| 194 | "@com_google_absl//absl/log:initialize", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 195 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 196 | ) |
| 197 | |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame] | 198 | cc_library( |
| 199 | name = "init_for_rust", |
| 200 | srcs = [ |
| 201 | "init_for_rust.cc", |
| 202 | ], |
| 203 | hdrs = [ |
| 204 | "init_for_rust.h", |
| 205 | ], |
| 206 | deps = [ |
| 207 | ":for_rust", |
| 208 | ":init", |
| 209 | "//aos/logging", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 210 | "@com_google_absl//absl/flags:flag", |
| 211 | "@com_google_absl//absl/log:flags", |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame] | 212 | "@crate_index//:cxx_cc", |
| 213 | ], |
| 214 | ) |
| 215 | |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 216 | autocxx_library( |
| 217 | name = "init_rs", |
| 218 | srcs = ["init.rs"], |
| 219 | crate_name = "aos_init", |
| 220 | libs = [ |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame] | 221 | ":init_for_rust", |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 222 | ], |
| 223 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 224 | visibility = ["//visibility:public"], |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame] | 225 | deps = [ |
| 226 | "@crate_index//:clap", |
Adam Snaider | 9121b30 | 2023-12-14 15:30:54 -0800 | [diff] [blame] | 227 | "@crate_index//:env_logger", |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame] | 228 | ], |
| 229 | ) |
| 230 | |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 231 | autocxx_library( |
| 232 | name = "test_init_rs", |
| 233 | testonly = True, |
| 234 | srcs = ["test_init.rs"], |
| 235 | crate_name = "aos_test_init", |
Adam Snaider | f560ae9 | 2023-11-07 17:06:21 -0800 | [diff] [blame] | 236 | gen_docs = False, |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 237 | libs = [ |
| 238 | "//aos/testing:tmpdir", |
| 239 | ], |
| 240 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 241 | visibility = ["//visibility:public"], |
| 242 | deps = [ |
| 243 | ":init_rs", |
Adam Snaider | 9121b30 | 2023-12-14 15:30:54 -0800 | [diff] [blame] | 244 | "@crate_index//:env_logger", |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 245 | ], |
| 246 | ) |
| 247 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 248 | cc_library( |
| 249 | name = "realtime", |
| 250 | srcs = [ |
| 251 | "realtime.cc", |
| 252 | ], |
| 253 | hdrs = [ |
| 254 | "realtime.h", |
| 255 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 256 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 257 | visibility = ["//visibility:public"], |
| 258 | deps = [ |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 259 | ":uuid", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 260 | "@com_google_absl//absl/log", |
| 261 | "@com_google_absl//absl/log:check", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 262 | ], |
| 263 | ) |
| 264 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 265 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 266 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 267 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 268 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 269 | visibility = ["//visibility:public"], |
James Kuszmaul | 1e57af9 | 2023-12-20 15:34:54 -0800 | [diff] [blame] | 270 | deps = ["//aos/flatbuffers/reflection:reflection_fbs"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 271 | ) |
| 272 | |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 273 | cc_static_flatbuffer( |
| 274 | name = "configuration_schema", |
| 275 | function = "aos::ConfigurationSchema", |
| 276 | target = ":configuration_fbs_reflection_out", |
| 277 | visibility = ["//visibility:public"], |
| 278 | ) |
| 279 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 280 | flatbuffer_ts_library( |
| 281 | name = "configuration_ts_fbs", |
| 282 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 283 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 284 | visibility = ["//visibility:public"], |
| 285 | ) |
| 286 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 287 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 288 | name = "configuration_fbs_python", |
| 289 | srcs = ["configuration.fbs"], |
| 290 | namespace = "aos", |
| 291 | tables = [ |
| 292 | "Configuration", |
| 293 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 294 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 295 | "Map", |
| 296 | "Node", |
| 297 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 298 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 299 | visibility = ["//visibility:public"], |
| 300 | ) |
| 301 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 302 | flatbuffer_rust_library( |
| 303 | name = "configuration_rust_fbs", |
| 304 | srcs = ["configuration.fbs"], |
| 305 | crate_name = "aos_configuration_fbs", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 306 | visibility = ["//visibility:public"], |
| 307 | ) |
| 308 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 309 | cc_library( |
| 310 | name = "configuration", |
| 311 | srcs = [ |
| 312 | "configuration.cc", |
| 313 | ], |
| 314 | hdrs = [ |
| 315 | "configuration.h", |
| 316 | ], |
Austin Schuh | 605d5ff | 2024-05-10 15:59:54 -0700 | [diff] [blame] | 317 | copts = compiler_select({ |
| 318 | "clang": [], |
| 319 | "gcc": ["-Wno-missing-field-initializers"], |
| 320 | }), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 321 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 322 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 323 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 324 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 325 | ":flatbuffer_merge", |
| 326 | ":flatbuffers", |
| 327 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 328 | "//aos:unique_malloc_ptr", |
Austin Schuh | 83cbb1e | 2023-06-23 12:59:02 -0700 | [diff] [blame] | 329 | "//aos/ipc_lib:index", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 330 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 331 | "//aos/util:file", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 332 | "@com_google_absl//absl/container:btree", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 333 | "@com_google_absl//absl/log", |
| 334 | "@com_google_absl//absl/log:check", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 335 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 336 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 337 | ) |
| 338 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 339 | cc_library( |
| 340 | name = "configuration_for_rust", |
| 341 | srcs = [ |
| 342 | "configuration_for_rust.cc", |
| 343 | ], |
| 344 | hdrs = [ |
| 345 | "configuration_for_rust.h", |
| 346 | ], |
| 347 | deps = [ |
| 348 | ":configuration", |
| 349 | ":for_rust", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 350 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 351 | ], |
| 352 | ) |
| 353 | |
| 354 | autocxx_library( |
| 355 | name = "configuration_rs", |
| 356 | srcs = ["configuration.rs"], |
| 357 | crate_name = "aos_configuration", |
| 358 | libs = [ |
| 359 | ":configuration", |
| 360 | ":configuration_for_rust", |
| 361 | ":configuration_fbs", |
| 362 | ], |
| 363 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Adam Snaider | f560ae9 | 2023-11-07 17:06:21 -0800 | [diff] [blame] | 364 | test_data = [ |
| 365 | "//aos/testdata:test_configs", |
| 366 | ], |
James Kuszmaul | 1cd3c2b | 2024-05-21 17:08:10 -0700 | [diff] [blame] | 367 | test_deps = [ |
| 368 | "//aos/testing:path_rs", |
| 369 | ], |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 370 | visibility = ["//visibility:public"], |
| 371 | deps = [ |
| 372 | ":configuration_rust_fbs", |
| 373 | ":flatbuffers_rs", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 374 | "@crate_index//:thiserror", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 375 | ], |
| 376 | ) |
| 377 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 378 | flatbuffer_ts_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 379 | name = "json_to_flatbuffer_fbs_ts", |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 380 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 381 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 382 | visibility = ["//aos:__subpackages__"], |
| 383 | ) |
| 384 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 385 | flatbuffer_cc_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 386 | name = "json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 387 | srcs = ["json_to_flatbuffer.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 388 | gen_reflections = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 389 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 390 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 391 | ) |
| 392 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 393 | flatbuffer_rust_library( |
| 394 | name = "json_to_flatbuffer_rust_fbs", |
| 395 | srcs = ["json_to_flatbuffer.fbs"], |
| 396 | crate_name = "aos_json_to_flatbuffer_fbs", |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 397 | visibility = ["//aos:__subpackages__"], |
| 398 | ) |
| 399 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 400 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 401 | name = "flatbuffer_utils", |
| 402 | srcs = ["flatbuffer_utils.cc"], |
| 403 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 404 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 405 | visibility = ["//visibility:public"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 406 | deps = [ |
| 407 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 408 | "@com_google_absl//absl/log", |
| 409 | "@com_google_absl//absl/log:check", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 410 | ], |
| 411 | ) |
| 412 | |
| 413 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 414 | name = "json_tokenizer", |
| 415 | srcs = ["json_tokenizer.cc"], |
| 416 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 417 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 418 | deps = [ |
Pallavi Madhukar | e2eb281 | 2022-07-19 09:56:09 -0700 | [diff] [blame] | 419 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 420 | "@com_google_absl//absl/log", |
| 421 | "@com_google_absl//absl/log:check", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 422 | "@com_google_absl//absl/strings", |
| 423 | ], |
| 424 | ) |
| 425 | |
| 426 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 427 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 428 | srcs = [ |
| 429 | "flatbuffer_introspection.cc", |
| 430 | "json_to_flatbuffer.cc", |
| 431 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 432 | hdrs = ["json_to_flatbuffer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 433 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 434 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 435 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 436 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 437 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 438 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 439 | ":json_tokenizer", |
James Kuszmaul | f5eb468 | 2023-09-22 17:16:59 -0700 | [diff] [blame] | 440 | "//aos/flatbuffers:builder", |
Austin Schuh | bba1028 | 2021-03-20 22:03:28 -0700 | [diff] [blame] | 441 | "//aos/util:file", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 442 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 443 | "@com_google_absl//absl/log", |
| 444 | "@com_google_absl//absl/log:check", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 445 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 446 | ], |
| 447 | ) |
| 448 | |
| 449 | cc_test( |
| 450 | name = "json_to_flatbuffer_test", |
| 451 | srcs = [ |
| 452 | "json_to_flatbuffer_test.cc", |
| 453 | ], |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 454 | data = [ |
| 455 | ":json_to_flatbuffer_fbs_reflection_out", |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 456 | ":json_to_flatbuffer_test_spaces.json", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 457 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 458 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 459 | deps = [ |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 460 | ":flatbuffer_merge", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 461 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 462 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 463 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 464 | "//aos/testing:path", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 465 | ], |
| 466 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 467 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 468 | cc_test( |
| 469 | name = "flatbuffer_introspection_test", |
| 470 | srcs = [ |
| 471 | "flatbuffer_introspection_test.cc", |
| 472 | ], |
| 473 | data = [ |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 474 | ":json_to_flatbuffer_fbs_reflection_out", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 475 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 476 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 477 | deps = [ |
| 478 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 479 | ":json_to_flatbuffer_fbs", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 480 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 481 | "//aos/testing:path", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 482 | "//aos/util:file", |
| 483 | "@com_github_google_flatbuffers//:flatbuffers", |
| 484 | ], |
| 485 | ) |
| 486 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 487 | cc_library( |
| 488 | name = "flatbuffer_merge", |
| 489 | srcs = ["flatbuffer_merge.cc"], |
| 490 | hdrs = ["flatbuffer_merge.h"], |
| 491 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 492 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 493 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 494 | deps = [ |
| 495 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 496 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 497 | "@com_github_google_flatbuffers//:flatbuffers", |
| 498 | ], |
| 499 | ) |
| 500 | |
| 501 | cc_test( |
| 502 | name = "flatbuffer_merge_test", |
| 503 | srcs = [ |
| 504 | "flatbuffer_merge_test.cc", |
| 505 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 506 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 507 | deps = [ |
| 508 | ":flatbuffer_merge", |
| 509 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 510 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 511 | "//aos/testing:googletest", |
| 512 | ], |
| 513 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 514 | |
| 515 | cc_library( |
| 516 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 517 | srcs = [ |
| 518 | "flatbuffers.cc", |
| 519 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 520 | hdrs = [ |
| 521 | "flatbuffers.h", |
| 522 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 523 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 524 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 525 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 526 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 527 | "//aos/containers:resizeable_buffer", |
Austin Schuh | 3c9f92c | 2024-04-30 17:56:42 -0700 | [diff] [blame] | 528 | "//aos/ipc_lib:data_alignment", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 529 | "//aos/util:file", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 530 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 531 | "@com_google_absl//absl/log", |
| 532 | "@com_google_absl//absl/log:check", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 533 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 534 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 535 | ], |
| 536 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 537 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 538 | rust_library( |
| 539 | name = "flatbuffers_rs", |
| 540 | srcs = ["flatbuffers.rs"], |
| 541 | crate_name = "aos_flatbuffers", |
Adam Snaider | f560ae9 | 2023-11-07 17:06:21 -0800 | [diff] [blame] | 542 | test_deps = [ |
| 543 | ":json_to_flatbuffer_rust_fbs", |
| 544 | ], |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 545 | visibility = ["//visibility:public"], |
| 546 | deps = [ |
| 547 | "@com_github_google_flatbuffers//rust", |
| 548 | ], |
| 549 | ) |
| 550 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 551 | cc_test( |
| 552 | name = "configuration_test", |
| 553 | srcs = [ |
| 554 | "configuration_test.cc", |
| 555 | ], |
| 556 | data = [ |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 557 | "//aos/events:ping_fbs_reflection_out", |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 558 | "//aos/events:pingpong_config", |
Brian Silverman | dae15a1 | 2022-07-23 12:55:20 -0700 | [diff] [blame] | 559 | "//aos/events:pong_fbs_reflection_out", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 560 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 561 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 562 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 563 | deps = [ |
| 564 | ":configuration", |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 565 | "//aos/events:ping_fbs", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 566 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 567 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 568 | "//aos/testing:path", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 569 | "//aos/testing:test_logging", |
| 570 | ], |
| 571 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 572 | |
| 573 | cc_binary( |
| 574 | name = "config_flattener", |
| 575 | srcs = [ |
| 576 | "config_flattener.cc", |
| 577 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 578 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 579 | visibility = ["//visibility:public"], |
| 580 | deps = [ |
| 581 | ":configuration", |
| 582 | ":init", |
| 583 | "//aos/util:file", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 584 | "@com_google_absl//absl/log", |
| 585 | "@com_google_absl//absl/log:check", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 586 | ], |
| 587 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 588 | |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 589 | cc_library( |
| 590 | name = "aos_cli_utils", |
| 591 | srcs = [ |
| 592 | "aos_cli_utils.cc", |
| 593 | ], |
| 594 | hdrs = [ |
| 595 | "aos_cli_utils.h", |
| 596 | ], |
| 597 | target_compatible_with = ["@platforms//os:linux"], |
| 598 | visibility = ["//visibility:public"], |
| 599 | deps = [ |
| 600 | ":configuration", |
| 601 | "//aos:init", |
| 602 | "//aos/events:shm_event_loop", |
Austin Schuh | 893d7f4 | 2022-09-16 15:01:35 -0700 | [diff] [blame] | 603 | "//aos/events:simulated_event_loop", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 604 | "@com_google_absl//absl/log", |
| 605 | "@com_google_absl//absl/log:check", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 606 | ], |
| 607 | ) |
| 608 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 609 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 610 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 611 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 612 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 613 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 614 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 615 | visibility = ["//visibility:public"], |
| 616 | deps = [ |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 617 | ":aos_cli_utils", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 618 | ":configuration", |
| 619 | ":json_to_flatbuffer", |
| 620 | "//aos:init", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 621 | "@com_google_absl//absl/log", |
| 622 | "@com_google_absl//absl/log:check", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 623 | ], |
| 624 | ) |
| 625 | |
| 626 | cc_binary( |
Austin Schuh | 9900460 | 2024-03-16 11:59:24 -0700 | [diff] [blame] | 627 | name = "aos_jitter", |
| 628 | srcs = [ |
| 629 | "aos_jitter.cc", |
| 630 | ], |
| 631 | target_compatible_with = ["@platforms//os:linux"], |
| 632 | visibility = ["//visibility:public"], |
| 633 | deps = [ |
| 634 | ":aos_cli_utils", |
| 635 | ":configuration", |
| 636 | ":init", |
| 637 | ":json_to_flatbuffer", |
| 638 | ":realtime", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 639 | "@com_google_absl//absl/log", |
| 640 | "@com_google_absl//absl/log:check", |
Austin Schuh | 9900460 | 2024-03-16 11:59:24 -0700 | [diff] [blame] | 641 | ], |
| 642 | ) |
| 643 | |
| 644 | cc_binary( |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 645 | name = "aos_send", |
| 646 | srcs = [ |
| 647 | "aos_send.cc", |
| 648 | ], |
| 649 | target_compatible_with = ["@platforms//os:linux"], |
| 650 | visibility = ["//visibility:public"], |
| 651 | deps = [ |
| 652 | ":aos_cli_utils", |
| 653 | ":configuration", |
| 654 | ":init", |
| 655 | ":json_to_flatbuffer", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 656 | "@com_google_absl//absl/flags:flag", |
| 657 | "@com_google_absl//absl/log", |
| 658 | "@com_google_absl//absl/log:check", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 659 | ], |
| 660 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 661 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 662 | cc_binary( |
| 663 | name = "aos_graph_nodes", |
| 664 | srcs = [ |
| 665 | "aos_graph_nodes.cc", |
| 666 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 667 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 668 | visibility = ["//visibility:public"], |
| 669 | deps = [ |
| 670 | ":configuration", |
| 671 | ":json_to_flatbuffer", |
| 672 | "//aos:init", |
| 673 | "//aos/events:shm_event_loop", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 674 | "@com_google_absl//absl/log", |
| 675 | "@com_google_absl//absl/log:check", |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 676 | ], |
| 677 | ) |
| 678 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 679 | cc_library( |
| 680 | name = "ftrace", |
| 681 | srcs = [ |
| 682 | "ftrace.cc", |
| 683 | ], |
| 684 | hdrs = [ |
| 685 | "ftrace.h", |
| 686 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 687 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 688 | visibility = ["//visibility:public"], |
| 689 | deps = [ |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 690 | "@com_google_absl//absl/flags:flag", |
| 691 | "@com_google_absl//absl/log:check", |
Austin Schuh | c9de013 | 2022-12-26 18:04:53 -0800 | [diff] [blame] | 692 | "@com_google_absl//absl/strings", |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 693 | ], |
| 694 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 695 | |
| 696 | cc_library( |
| 697 | name = "fast_string_builder", |
| 698 | srcs = [ |
| 699 | "fast_string_builder.cc", |
| 700 | ], |
| 701 | hdrs = [ |
| 702 | "fast_string_builder.h", |
| 703 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 704 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 705 | visibility = ["//visibility:public"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 706 | deps = [ |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 707 | "@com_google_absl//absl/log", |
| 708 | "@com_google_absl//absl/log:check", |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 709 | "@com_google_absl//absl/strings", |
| 710 | "@com_google_absl//absl/strings:str_format", |
| 711 | ], |
| 712 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 713 | |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 714 | cc_test( |
| 715 | name = "realtime_test", |
| 716 | srcs = [ |
| 717 | "realtime_test.cc", |
| 718 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 719 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 720 | visibility = ["//visibility:public"], |
| 721 | deps = [ |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 722 | ":init", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 723 | ":realtime", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 724 | "@com_google_absl//absl/flags:flag", |
| 725 | "@com_google_absl//absl/log", |
| 726 | "@com_google_absl//absl/log:check", |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 727 | "@com_google_googletest//:gtest", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 728 | ], |
| 729 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 730 | |
| 731 | cc_test( |
| 732 | name = "flatbuffers_test", |
| 733 | srcs = [ |
| 734 | "flatbuffers_test.cc", |
| 735 | ], |
| 736 | deps = [ |
| 737 | ":flatbuffers", |
| 738 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 739 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 740 | "//aos/testing:googletest", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 741 | "//aos/testing:tmpdir", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 742 | ], |
| 743 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 744 | |
| 745 | py_binary( |
| 746 | name = "flatbuffers_static", |
| 747 | srcs = ["flatbuffers_static.py"], |
| 748 | visibility = ["//visibility:public"], |
| 749 | ) |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 750 | |
| 751 | cc_library( |
| 752 | name = "uuid", |
| 753 | srcs = ["uuid.cc"], |
| 754 | hdrs = ["uuid.h"], |
| 755 | target_compatible_with = ["@platforms//os:linux"], |
| 756 | visibility = ["//visibility:public"], |
| 757 | deps = [ |
| 758 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 759 | "@com_google_absl//absl/flags:flag", |
| 760 | "@com_google_absl//absl/log", |
| 761 | "@com_google_absl//absl/log:check", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 762 | "@com_google_absl//absl/types:span", |
| 763 | ], |
| 764 | ) |
| 765 | |
| 766 | cc_test( |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 767 | name = "uuid_collision_test", |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 768 | timeout = "eternal", |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 769 | srcs = ["uuid_collision_test.cc"], |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 770 | shard_count = 2, |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 771 | target_compatible_with = ["@platforms//os:linux"], |
| 772 | deps = [ |
| 773 | ":uuid", |
| 774 | "//aos/testing:googletest", |
| 775 | ], |
| 776 | ) |
| 777 | |
| 778 | cc_test( |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 779 | name = "uuid_test", |
| 780 | srcs = ["uuid_test.cc"], |
| 781 | target_compatible_with = ["@platforms//os:linux"], |
| 782 | deps = [ |
| 783 | ":uuid", |
| 784 | "//aos/testing:googletest", |
| 785 | ], |
| 786 | ) |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 787 | |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 788 | cc_library( |
| 789 | name = "uuid_for_rust", |
| 790 | hdrs = ["uuid_for_rust.h"], |
| 791 | deps = [ |
| 792 | ":uuid", |
| 793 | ], |
| 794 | ) |
| 795 | |
| 796 | autocxx_library( |
| 797 | name = "uuid_rs", |
| 798 | srcs = ["uuid.rs"], |
| 799 | crate_name = "aos_uuid", |
| 800 | libs = [ |
| 801 | ":uuid", |
| 802 | ":uuid_for_rust", |
| 803 | ], |
| 804 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 805 | rs_deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 806 | "@crate_index//:uuid", |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 807 | ], |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 808 | visibility = ["//visibility:public"], |
| 809 | ) |
| 810 | |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 811 | cc_binary( |
| 812 | name = "aos_graph_channels", |
| 813 | srcs = [ |
| 814 | "aos_graph_channels.cc", |
| 815 | ], |
| 816 | target_compatible_with = ["@platforms//os:linux"], |
| 817 | deps = [ |
| 818 | "//aos:configuration", |
| 819 | "//aos:init", |
| 820 | "//aos:json_to_flatbuffer", |
| 821 | "//aos/events:simulated_event_loop", |
| 822 | "//aos/events/logging:log_reader", |
| 823 | "//aos/time", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 824 | "@com_google_absl//absl/flags:flag", |
| 825 | "@com_google_absl//absl/log", |
| 826 | "@com_google_absl//absl/log:check", |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 827 | ], |
| 828 | ) |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 829 | |
| 830 | cc_library( |
| 831 | name = "for_rust", |
| 832 | hdrs = [ |
| 833 | "for_rust.h", |
| 834 | ], |
| 835 | visibility = ["//visibility:public"], |
| 836 | deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 837 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 838 | ], |
| 839 | ) |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 840 | |
| 841 | cc_library( |
| 842 | name = "sha256", |
| 843 | srcs = [ |
| 844 | "sha256.cc", |
| 845 | ], |
| 846 | hdrs = ["sha256.h"], |
| 847 | target_compatible_with = ["@platforms//os:linux"], |
| 848 | visibility = ["//visibility:public"], |
| 849 | deps = [ |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 850 | "//aos/util:file", |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 851 | "@boringssl//:crypto", |
| 852 | "@com_google_absl//absl/types:span", |
| 853 | ], |
| 854 | ) |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 855 | |
| 856 | cc_test( |
| 857 | name = "sha256_test", |
| 858 | srcs = ["sha256_test.cc"], |
| 859 | deps = [ |
| 860 | ":sha256", |
| 861 | "//aos/testing:googletest", |
| 862 | "//aos/testing:tmpdir", |
| 863 | ], |
| 864 | ) |
Adam Snaider | cc62281 | 2023-11-07 17:59:27 -0800 | [diff] [blame] | 865 | |
| 866 | rust_library( |
| 867 | name = "aos_rs", |
| 868 | srcs = ["aos.rs"], |
| 869 | crate_name = "aos", |
| 870 | visibility = ["//visibility:public"], |
| 871 | deps = [ |
| 872 | ":configuration_rs", |
| 873 | ":flatbuffers_rs", |
| 874 | ":init_rs", |
| 875 | ":uuid_rs", |
| 876 | "//aos/events:event_loop_runtime", |
| 877 | "//aos/events:shm_event_loop_rs", |
| 878 | "//aos/events:simulated_event_loop_rs", |
| 879 | ], |
| 880 | ) |
Austin Schuh | 8a399de | 2024-06-05 10:46:23 -0700 | [diff] [blame] | 881 | |
| 882 | cc_library( |
| 883 | name = "shared_span", |
| 884 | hdrs = ["shared_span.h"], |
| 885 | visibility = ["//visibility:public"], |
| 886 | deps = [ |
| 887 | "@com_google_absl//absl/types:span", |
| 888 | ], |
| 889 | ) |