blob: c20357fd5b89f133d98d1e264814b0e89a3f9205 [file] [log] [blame]
Brian Silvermanacdabeb2019-03-23 14:04:36 -07001load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")
James Kuszmauld6d37d12019-03-30 13:04:54 -07002load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
Alex Perrycb7da4b2019-08-28 19:35:56 -07003load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
Austin Schuhda9d0602019-09-15 17:29:38 -07004load("@npm_bazel_typescript//:defs.bzl", "ts_library")
Austin Schuh02d31fb2019-03-23 15:04:54 -07005load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
Austin Schuheed14442019-03-23 14:42:46 -07006
7ts_library(
Austin Schuh02d31fb2019-03-23 15:04:54 -07008 name = "demo",
Austin Schuheed14442019-03-23 14:42:46 -07009 srcs = [
10 "demo.ts",
11 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080012 target_compatible_with = ["@platforms//os:linux"],
Austin Schuheed14442019-03-23 14:42:46 -070013)
14
Brian Silvermanacdabeb2019-03-23 14:04:36 -070015gen_embedded(
16 name = "gen_embedded",
17 srcs = glob(
18 include = ["www_defaults/**/*"],
19 exclude = ["www/**/*"],
20 ),
Philipp Schraderdada1072020-11-24 11:34:46 -080021 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanacdabeb2019-03-23 14:04:36 -070022)
23
24aos_downloader_dir(
25 name = "www_files",
Alex Perry554cec02019-03-23 20:15:12 -070026 srcs = [
Alex Perry554cec02019-03-23 20:15:12 -070027 "//y2019/vision/server/www:files",
James Kuszmauld6d37d12019-03-30 13:04:54 -070028 "//y2019/vision/server/www:visualizer_bundle",
Austin Schuh02d31fb2019-03-23 15:04:54 -070029 ],
Brian Silvermanacdabeb2019-03-23 14:04:36 -070030 dir = "www",
Philipp Schraderdada1072020-11-24 11:34:46 -080031 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanacdabeb2019-03-23 14:04:36 -070032 visibility = ["//visibility:public"],
33)
34
James Kuszmauld6d37d12019-03-30 13:04:54 -070035cc_proto_library(
36 name = "server_data_proto",
37 srcs = ["server_data.proto"],
Philipp Schraderdada1072020-11-24 11:34:46 -080038 target_compatible_with = ["@platforms//os:linux"],
James Kuszmauld6d37d12019-03-30 13:04:54 -070039)
40
Brian Silvermanacdabeb2019-03-23 14:04:36 -070041cc_binary(
42 name = "server",
43 srcs = [
44 "server.cc",
45 ],
Alex Perry554cec02019-03-23 20:15:12 -070046 data = [
Alex Perry554cec02019-03-23 20:15:12 -070047 "//y2019/vision/server/www:files",
James Kuszmauld6d37d12019-03-30 13:04:54 -070048 "//y2019/vision/server/www:visualizer_bundle",
Austin Schuh02d31fb2019-03-23 15:04:54 -070049 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080050 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanacdabeb2019-03-23 14:04:36 -070051 visibility = ["//visibility:public"],
52 deps = [
53 ":gen_embedded",
James Kuszmauld6d37d12019-03-30 13:04:54 -070054 ":server_data_proto",
Brian Silvermanacdabeb2019-03-23 14:04:36 -070055 "//aos:init",
Austin Schuha966a372019-04-14 17:15:28 -070056 "//aos/containers:ring_buffer",
Alex Perrycb7da4b2019-08-28 19:35:56 -070057 "//aos/events:shm_event_loop",
Brian Silvermanacdabeb2019-03-23 14:04:36 -070058 "//aos/logging",
Austin Schuh86cd5722019-04-14 13:34:20 -070059 "//aos/seasocks:seasocks_logger",
Brian Silvermanacdabeb2019-03-23 14:04:36 -070060 "//aos/time",
Alex Perryd13750f2019-04-10 21:15:28 -070061 "//frc971/control_loops:pose",
Alex Perrycb7da4b2019-08-28 19:35:56 -070062 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Brian Silvermanacdabeb2019-03-23 14:04:36 -070063 "//third_party/seasocks",
Alex Perryd13750f2019-04-10 21:15:28 -070064 "//y2019:constants",
Alex Perrycb7da4b2019-08-28 19:35:56 -070065 "//y2019/control_loops/drivetrain:camera_fbs",
66 "//y2019/control_loops/superstructure:superstructure_status_fbs",
Brian Silvermanacdabeb2019-03-23 14:04:36 -070067 ],
68)