| # Copyright 2019 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//build/components.gni") | |
| import("//build/rust/rustc_binary.gni") | |
| rustc_binary("bin") { | |
| name = "httpsdate_time_source" | |
| edition = "2024" | |
| with_unit_tests = true | |
| deps = [ | |
| ":httpsdate_config", | |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", | |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_rust", | |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/cobalt/rust/builders", | |
| "//src/lib/diagnostics/inspect/runtime/rust", | |
| "//src/lib/diagnostics/inspect/rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fidl/rust/fidl-contrib", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/fuchsia-runtime", | |
| "//src/lib/fuchsia-sync", | |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", | |
| "//src/sys/time/lib/httpdate-hyper", | |
| "//src/sys/time/lib/pull-source", | |
| "//src/sys/time/lib/push-source", | |
| "//src/sys/time/lib/time_metrics_registry", | |
| "//third_party/cobalt/src/lib/client/rust:cobalt-client", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:hyper", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:rand", | |
| ] | |
| sources = [ | |
| "src/bound.rs", | |
| "src/constants.rs", | |
| "src/datatypes.rs", | |
| "src/diagnostics/cobalt.rs", | |
| "src/diagnostics/composite.rs", | |
| "src/diagnostics/fake.rs", | |
| "src/diagnostics/inspect.rs", | |
| "src/diagnostics/mod.rs", | |
| "src/httpsdate.rs", | |
| "src/main.rs", | |
| "src/sampler.rs", | |
| ] | |
| test_deps = [ | |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", | |
| "//third_party/rust_crates:assert_matches", | |
| ] | |
| } | |
| fuchsia_component_manifest("manifest") { | |
| component_name = "httpsdate_time_source" | |
| manifest = "meta/service.cml" | |
| } | |
| fuchsia_structured_config_rust_lib("httpsdate_config") { | |
| cm_label = ":manifest" | |
| } | |
| fuchsia_component("service") { | |
| cm_label = ":manifest" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_unittest_package("httpsdate-time-source-tests") { | |
| deps = [ ":bin_test" ] | |
| test_specs = { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| } | |
| } | |
| fuchsia_package("httpsdate-time-source") { | |
| deps = [ ":service" ] | |
| } | |
| fuchsia_package("httpsdate-time-source-pull") { | |
| deps = [ ":service" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":httpsdate-time-source-tests", | |
| "tests", | |
| ] | |
| } |