| # Copyright 2026 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. | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/rust:defs.bzl", "rustc_library") | |
| package( | |
| default_applicable_licenses = ["//:license"], | |
| default_visibility = ["//visibility:public"], | |
| ) | |
| rustc_library( | |
| name = "lib", | |
| srcs = [ | |
| "src/analytics_client.rs", | |
| "src/env_info.rs", | |
| "src/ga4_event.rs", | |
| "src/ga4_metrics_service.rs", | |
| "src/lib.rs", | |
| "src/metrics_state.rs", | |
| "src/mock_https_client.rs", | |
| "src/notice.rs", | |
| ], | |
| crate_name = "analytics", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| test_deps = [ | |
| "//src/lib/fuchsia-sync", | |
| "//third_party/rust_crates/vendor:tempfile", | |
| "//third_party/rust_crates/vendor:url", | |
| ], | |
| version = "0.1.0", | |
| with_host_unit_tests = True, | |
| deps = [ | |
| "//src/lib/agents:lib", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-hyper", | |
| "//third_party/rust_crates/vendor:cfg-if", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:home", | |
| "//third_party/rust_crates/vendor:http-body-util", | |
| "//third_party/rust_crates/vendor:hyper", | |
| "//third_party/rust_crates/vendor:log", | |
| "//third_party/rust_crates/vendor:nix", | |
| "//third_party/rust_crates/vendor:regex", | |
| "//third_party/rust_crates/vendor:serde", | |
| "//third_party/rust_crates/vendor:serde_json", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| "//third_party/rust_crates/vendor:uuid", | |
| ], | |
| ) |