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", |
Adam Snaider | 5f00067 | 2023-11-02 16:04:30 -0700 | [diff] [blame^] | 228 | docs = False, |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 229 | libs = [ |
| 230 | "//aos/testing:tmpdir", |
| 231 | ], |
| 232 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 233 | visibility = ["//visibility:public"], |
| 234 | deps = [ |
| 235 | ":init_rs", |
| 236 | ], |
| 237 | ) |
| 238 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 239 | cc_library( |
| 240 | name = "realtime", |
| 241 | srcs = [ |
| 242 | "realtime.cc", |
| 243 | ], |
| 244 | hdrs = [ |
| 245 | "realtime.h", |
| 246 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 247 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 248 | visibility = ["//visibility:public"], |
| 249 | deps = [ |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 250 | ":uuid", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 251 | "@com_github_google_glog//:glog", |
| 252 | ], |
| 253 | ) |
| 254 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 255 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 256 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 257 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 258 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 259 | visibility = ["//visibility:public"], |
James Kuszmaul | 1e57af9 | 2023-12-20 15:34:54 -0800 | [diff] [blame] | 260 | deps = ["//aos/flatbuffers/reflection:reflection_fbs"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 261 | ) |
| 262 | |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 263 | cc_static_flatbuffer( |
| 264 | name = "configuration_schema", |
| 265 | function = "aos::ConfigurationSchema", |
| 266 | target = ":configuration_fbs_reflection_out", |
| 267 | visibility = ["//visibility:public"], |
| 268 | ) |
| 269 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 270 | flatbuffer_ts_library( |
| 271 | name = "configuration_ts_fbs", |
| 272 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 273 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 274 | visibility = ["//visibility:public"], |
| 275 | ) |
| 276 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 277 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 278 | name = "configuration_fbs_python", |
| 279 | srcs = ["configuration.fbs"], |
| 280 | namespace = "aos", |
| 281 | tables = [ |
| 282 | "Configuration", |
| 283 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 284 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 285 | "Map", |
| 286 | "Node", |
| 287 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 288 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 289 | visibility = ["//visibility:public"], |
| 290 | ) |
| 291 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 292 | flatbuffer_rust_library( |
| 293 | name = "configuration_rust_fbs", |
| 294 | srcs = ["configuration.fbs"], |
| 295 | crate_name = "aos_configuration_fbs", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 296 | visibility = ["//visibility:public"], |
| 297 | ) |
| 298 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 299 | cc_library( |
| 300 | name = "configuration", |
| 301 | srcs = [ |
| 302 | "configuration.cc", |
| 303 | ], |
| 304 | hdrs = [ |
| 305 | "configuration.h", |
| 306 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 307 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 308 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 309 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 310 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 311 | ":flatbuffer_merge", |
| 312 | ":flatbuffers", |
| 313 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 314 | "//aos:unique_malloc_ptr", |
Austin Schuh | 83cbb1e | 2023-06-23 12:59:02 -0700 | [diff] [blame] | 315 | "//aos/ipc_lib:index", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 316 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 317 | "//aos/util:file", |
| 318 | "@com_github_google_glog//:glog", |
| 319 | "@com_google_absl//absl/container:btree", |
| 320 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 321 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 322 | ) |
| 323 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 324 | cc_library( |
| 325 | name = "configuration_for_rust", |
| 326 | srcs = [ |
| 327 | "configuration_for_rust.cc", |
| 328 | ], |
| 329 | hdrs = [ |
| 330 | "configuration_for_rust.h", |
| 331 | ], |
| 332 | deps = [ |
| 333 | ":configuration", |
| 334 | ":for_rust", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 335 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 336 | ], |
| 337 | ) |
| 338 | |
| 339 | autocxx_library( |
| 340 | name = "configuration_rs", |
| 341 | srcs = ["configuration.rs"], |
| 342 | crate_name = "aos_configuration", |
| 343 | libs = [ |
| 344 | ":configuration", |
| 345 | ":configuration_for_rust", |
| 346 | ":configuration_fbs", |
| 347 | ], |
| 348 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 349 | visibility = ["//visibility:public"], |
| 350 | deps = [ |
| 351 | ":configuration_rust_fbs", |
| 352 | ":flatbuffers_rs", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 353 | "@crate_index//:thiserror", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 354 | ], |
| 355 | ) |
| 356 | |
| 357 | rust_test( |
| 358 | name = "configuration_rs_test", |
| 359 | crate = ":configuration_rs", |
| 360 | data = [ |
| 361 | "//aos/testdata:test_configs", |
| 362 | ], |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 363 | ) |
| 364 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 365 | flatbuffer_ts_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 366 | name = "json_to_flatbuffer_fbs_ts", |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 367 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 368 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 369 | visibility = ["//aos:__subpackages__"], |
| 370 | ) |
| 371 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 372 | flatbuffer_cc_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 373 | name = "json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 374 | srcs = ["json_to_flatbuffer.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 375 | gen_reflections = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 376 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 377 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 378 | ) |
| 379 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 380 | flatbuffer_rust_library( |
| 381 | name = "json_to_flatbuffer_rust_fbs", |
| 382 | srcs = ["json_to_flatbuffer.fbs"], |
| 383 | crate_name = "aos_json_to_flatbuffer_fbs", |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 384 | visibility = ["//aos:__subpackages__"], |
| 385 | ) |
| 386 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 387 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 388 | name = "flatbuffer_utils", |
| 389 | srcs = ["flatbuffer_utils.cc"], |
| 390 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 391 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 392 | visibility = ["//visibility:public"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 393 | deps = [ |
| 394 | "@com_github_google_flatbuffers//:flatbuffers", |
Brian Silverman | cf4fb66 | 2021-02-10 17:54:53 -0800 | [diff] [blame] | 395 | "@com_github_google_glog//:glog", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 396 | ], |
| 397 | ) |
| 398 | |
| 399 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 400 | name = "json_tokenizer", |
| 401 | srcs = ["json_tokenizer.cc"], |
| 402 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 403 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 404 | deps = [ |
Pallavi Madhukar | e2eb281 | 2022-07-19 09:56:09 -0700 | [diff] [blame] | 405 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 406 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 407 | "@com_google_absl//absl/strings", |
| 408 | ], |
| 409 | ) |
| 410 | |
| 411 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 412 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 413 | srcs = [ |
| 414 | "flatbuffer_introspection.cc", |
| 415 | "json_to_flatbuffer.cc", |
| 416 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 417 | hdrs = ["json_to_flatbuffer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 418 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 419 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 420 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 421 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 422 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 423 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 424 | ":json_tokenizer", |
James Kuszmaul | f5eb468 | 2023-09-22 17:16:59 -0700 | [diff] [blame] | 425 | "//aos/flatbuffers:builder", |
Austin Schuh | bba1028 | 2021-03-20 22:03:28 -0700 | [diff] [blame] | 426 | "//aos/util:file", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 427 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 428 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 429 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 430 | ], |
| 431 | ) |
| 432 | |
| 433 | cc_test( |
| 434 | name = "json_to_flatbuffer_test", |
| 435 | srcs = [ |
| 436 | "json_to_flatbuffer_test.cc", |
| 437 | ], |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 438 | data = [ |
| 439 | ":json_to_flatbuffer_fbs_reflection_out", |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 440 | ":json_to_flatbuffer_test_spaces.json", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 441 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 442 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 443 | deps = [ |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 444 | ":flatbuffer_merge", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 445 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 446 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 447 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 448 | "//aos/testing:path", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 449 | ], |
| 450 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 451 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 452 | cc_test( |
| 453 | name = "flatbuffer_introspection_test", |
| 454 | srcs = [ |
| 455 | "flatbuffer_introspection_test.cc", |
| 456 | ], |
| 457 | data = [ |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 458 | ":json_to_flatbuffer_fbs_reflection_out", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 459 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 460 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 461 | deps = [ |
| 462 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 463 | ":json_to_flatbuffer_fbs", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 464 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 465 | "//aos/testing:path", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 466 | "//aos/util:file", |
| 467 | "@com_github_google_flatbuffers//:flatbuffers", |
| 468 | ], |
| 469 | ) |
| 470 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 471 | cc_library( |
| 472 | name = "flatbuffer_merge", |
| 473 | srcs = ["flatbuffer_merge.cc"], |
| 474 | hdrs = ["flatbuffer_merge.h"], |
| 475 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 476 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 477 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 478 | deps = [ |
| 479 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 480 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 481 | "@com_github_google_flatbuffers//:flatbuffers", |
| 482 | ], |
| 483 | ) |
| 484 | |
| 485 | cc_test( |
| 486 | name = "flatbuffer_merge_test", |
| 487 | srcs = [ |
| 488 | "flatbuffer_merge_test.cc", |
| 489 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 490 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 491 | deps = [ |
| 492 | ":flatbuffer_merge", |
| 493 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 494 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 495 | "//aos/testing:googletest", |
| 496 | ], |
| 497 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 498 | |
| 499 | cc_library( |
| 500 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 501 | srcs = [ |
| 502 | "flatbuffers.cc", |
| 503 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 504 | hdrs = [ |
| 505 | "flatbuffers.h", |
| 506 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 507 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 508 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 509 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 510 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 511 | "//aos/containers:resizeable_buffer", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 512 | "//aos/util:file", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 513 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 514 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 515 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 516 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 517 | ], |
| 518 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 519 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 520 | rust_library( |
| 521 | name = "flatbuffers_rs", |
| 522 | srcs = ["flatbuffers.rs"], |
| 523 | crate_name = "aos_flatbuffers", |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 524 | visibility = ["//visibility:public"], |
| 525 | deps = [ |
| 526 | "@com_github_google_flatbuffers//rust", |
| 527 | ], |
| 528 | ) |
| 529 | |
| 530 | rust_test( |
| 531 | name = "flatbuffers_rs_test", |
| 532 | crate = ":flatbuffers_rs", |
| 533 | deps = [ |
| 534 | ":json_to_flatbuffer_rust_fbs", |
| 535 | ], |
| 536 | ) |
| 537 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 538 | cc_test( |
| 539 | name = "configuration_test", |
| 540 | srcs = [ |
| 541 | "configuration_test.cc", |
| 542 | ], |
| 543 | data = [ |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 544 | "//aos/events:ping_fbs_reflection_out", |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 545 | "//aos/events:pingpong_config", |
Brian Silverman | dae15a1 | 2022-07-23 12:55:20 -0700 | [diff] [blame] | 546 | "//aos/events:pong_fbs_reflection_out", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 547 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 548 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 549 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 550 | deps = [ |
| 551 | ":configuration", |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 552 | "//aos/events:ping_fbs", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 553 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 554 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 555 | "//aos/testing:path", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 556 | "//aos/testing:test_logging", |
| 557 | ], |
| 558 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 559 | |
| 560 | cc_binary( |
| 561 | name = "config_flattener", |
| 562 | srcs = [ |
| 563 | "config_flattener.cc", |
| 564 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 565 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 566 | visibility = ["//visibility:public"], |
| 567 | deps = [ |
| 568 | ":configuration", |
| 569 | ":init", |
| 570 | "//aos/util:file", |
| 571 | "@com_github_google_glog//:glog", |
| 572 | ], |
| 573 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 574 | |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 575 | cc_library( |
| 576 | name = "aos_cli_utils", |
| 577 | srcs = [ |
| 578 | "aos_cli_utils.cc", |
| 579 | ], |
| 580 | hdrs = [ |
| 581 | "aos_cli_utils.h", |
| 582 | ], |
| 583 | target_compatible_with = ["@platforms//os:linux"], |
| 584 | visibility = ["//visibility:public"], |
| 585 | deps = [ |
| 586 | ":configuration", |
| 587 | "//aos:init", |
| 588 | "//aos/events:shm_event_loop", |
Austin Schuh | 893d7f4 | 2022-09-16 15:01:35 -0700 | [diff] [blame] | 589 | "//aos/events:simulated_event_loop", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 590 | "@com_github_google_glog//:glog", |
| 591 | ], |
| 592 | ) |
| 593 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 594 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 595 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 596 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 597 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 598 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 599 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 600 | visibility = ["//visibility:public"], |
| 601 | deps = [ |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 602 | ":aos_cli_utils", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 603 | ":configuration", |
| 604 | ":json_to_flatbuffer", |
| 605 | "//aos:init", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 606 | "@com_github_google_glog//:glog", |
| 607 | ], |
| 608 | ) |
| 609 | |
| 610 | cc_binary( |
| 611 | name = "aos_send", |
| 612 | srcs = [ |
| 613 | "aos_send.cc", |
| 614 | ], |
| 615 | target_compatible_with = ["@platforms//os:linux"], |
| 616 | visibility = ["//visibility:public"], |
| 617 | deps = [ |
| 618 | ":aos_cli_utils", |
| 619 | ":configuration", |
| 620 | ":init", |
| 621 | ":json_to_flatbuffer", |
| 622 | "@com_github_gflags_gflags//:gflags", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 623 | "@com_github_google_glog//:glog", |
| 624 | ], |
| 625 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 626 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 627 | cc_binary( |
| 628 | name = "aos_graph_nodes", |
| 629 | srcs = [ |
| 630 | "aos_graph_nodes.cc", |
| 631 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 632 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 633 | visibility = ["//visibility:public"], |
| 634 | deps = [ |
| 635 | ":configuration", |
| 636 | ":json_to_flatbuffer", |
| 637 | "//aos:init", |
| 638 | "//aos/events:shm_event_loop", |
| 639 | "@com_github_google_glog//:glog", |
| 640 | ], |
| 641 | ) |
| 642 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 643 | cc_library( |
| 644 | name = "ftrace", |
| 645 | srcs = [ |
| 646 | "ftrace.cc", |
| 647 | ], |
| 648 | hdrs = [ |
| 649 | "ftrace.h", |
| 650 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 651 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 652 | visibility = ["//visibility:public"], |
| 653 | deps = [ |
| 654 | "@com_github_google_glog//:glog", |
Austin Schuh | c9de013 | 2022-12-26 18:04:53 -0800 | [diff] [blame] | 655 | "@com_google_absl//absl/strings", |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 656 | ], |
| 657 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 658 | |
| 659 | cc_library( |
| 660 | name = "fast_string_builder", |
| 661 | srcs = [ |
| 662 | "fast_string_builder.cc", |
| 663 | ], |
| 664 | hdrs = [ |
| 665 | "fast_string_builder.h", |
| 666 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 667 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 668 | visibility = ["//visibility:public"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 669 | deps = [ |
| 670 | "@com_github_google_glog//:glog", |
| 671 | "@com_google_absl//absl/strings", |
| 672 | "@com_google_absl//absl/strings:str_format", |
| 673 | ], |
| 674 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 675 | |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 676 | cc_test( |
| 677 | name = "realtime_test", |
| 678 | srcs = [ |
| 679 | "realtime_test.cc", |
| 680 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 681 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 682 | visibility = ["//visibility:public"], |
| 683 | deps = [ |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 684 | ":init", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 685 | ":realtime", |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 686 | "@com_github_gflags_gflags//:gflags", |
| 687 | "@com_github_google_glog//:glog", |
| 688 | "@com_google_googletest//:gtest", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 689 | ], |
| 690 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 691 | |
| 692 | cc_test( |
| 693 | name = "flatbuffers_test", |
| 694 | srcs = [ |
| 695 | "flatbuffers_test.cc", |
| 696 | ], |
| 697 | deps = [ |
| 698 | ":flatbuffers", |
| 699 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 700 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 701 | "//aos/testing:googletest", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 702 | "//aos/testing:tmpdir", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 703 | ], |
| 704 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 705 | |
| 706 | py_binary( |
| 707 | name = "flatbuffers_static", |
| 708 | srcs = ["flatbuffers_static.py"], |
| 709 | visibility = ["//visibility:public"], |
| 710 | ) |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 711 | |
| 712 | cc_library( |
| 713 | name = "uuid", |
| 714 | srcs = ["uuid.cc"], |
| 715 | hdrs = ["uuid.h"], |
| 716 | target_compatible_with = ["@platforms//os:linux"], |
| 717 | visibility = ["//visibility:public"], |
| 718 | deps = [ |
Austin Schuh | 8902fa5 | 2021-03-14 22:39:24 -0700 | [diff] [blame] | 719 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 720 | "@com_github_google_flatbuffers//:flatbuffers", |
| 721 | "@com_github_google_glog//:glog", |
| 722 | "@com_google_absl//absl/types:span", |
| 723 | ], |
| 724 | ) |
| 725 | |
| 726 | cc_test( |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 727 | name = "uuid_collision_test", |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 728 | timeout = "eternal", |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 729 | srcs = ["uuid_collision_test.cc"], |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 730 | shard_count = 2, |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 731 | target_compatible_with = ["@platforms//os:linux"], |
| 732 | deps = [ |
| 733 | ":uuid", |
| 734 | "//aos/testing:googletest", |
| 735 | ], |
| 736 | ) |
| 737 | |
| 738 | cc_test( |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 739 | name = "uuid_test", |
| 740 | srcs = ["uuid_test.cc"], |
| 741 | target_compatible_with = ["@platforms//os:linux"], |
| 742 | deps = [ |
| 743 | ":uuid", |
| 744 | "//aos/testing:googletest", |
| 745 | ], |
| 746 | ) |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 747 | |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 748 | cc_library( |
| 749 | name = "uuid_for_rust", |
| 750 | hdrs = ["uuid_for_rust.h"], |
| 751 | deps = [ |
| 752 | ":uuid", |
| 753 | ], |
| 754 | ) |
| 755 | |
| 756 | autocxx_library( |
| 757 | name = "uuid_rs", |
| 758 | srcs = ["uuid.rs"], |
| 759 | crate_name = "aos_uuid", |
| 760 | libs = [ |
| 761 | ":uuid", |
| 762 | ":uuid_for_rust", |
| 763 | ], |
| 764 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 765 | rs_deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 766 | "@crate_index//:uuid", |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 767 | ], |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 768 | visibility = ["//visibility:public"], |
| 769 | ) |
| 770 | |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 771 | cc_binary( |
| 772 | name = "aos_graph_channels", |
| 773 | srcs = [ |
| 774 | "aos_graph_channels.cc", |
| 775 | ], |
| 776 | target_compatible_with = ["@platforms//os:linux"], |
| 777 | deps = [ |
| 778 | "//aos:configuration", |
| 779 | "//aos:init", |
| 780 | "//aos:json_to_flatbuffer", |
| 781 | "//aos/events:simulated_event_loop", |
| 782 | "//aos/events/logging:log_reader", |
| 783 | "//aos/time", |
| 784 | "@com_github_gflags_gflags//:gflags", |
| 785 | "@com_github_google_glog//:glog", |
| 786 | ], |
| 787 | ) |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 788 | |
| 789 | cc_library( |
| 790 | name = "for_rust", |
| 791 | hdrs = [ |
| 792 | "for_rust.h", |
| 793 | ], |
| 794 | visibility = ["//visibility:public"], |
| 795 | deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 796 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 797 | ], |
| 798 | ) |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 799 | |
| 800 | cc_library( |
| 801 | name = "sha256", |
| 802 | srcs = [ |
| 803 | "sha256.cc", |
| 804 | ], |
| 805 | hdrs = ["sha256.h"], |
| 806 | target_compatible_with = ["@platforms//os:linux"], |
| 807 | visibility = ["//visibility:public"], |
| 808 | deps = [ |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 809 | "//aos/util:file", |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 810 | "@boringssl//:crypto", |
| 811 | "@com_google_absl//absl/types:span", |
| 812 | ], |
| 813 | ) |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 814 | |
| 815 | cc_test( |
| 816 | name = "sha256_test", |
| 817 | srcs = ["sha256_test.cc"], |
| 818 | deps = [ |
| 819 | ":sha256", |
| 820 | "//aos/testing:googletest", |
| 821 | "//aos/testing:tmpdir", |
| 822 | ], |
| 823 | ) |