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