blob: 7aa87df2327aa21eb6f63ea3ad3b5b3e75ac9c4b [file]
# 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("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS")
load("//build/bazel/rules/rust:defs.bzl", "rustc_binary", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "lib",
srcs = ["src/lib.rs"],
edition = "2024",
lint_config = "//build/config/rust/lints:clippy_warn_all",
target_compatible_with = HOST_CONSTRAINTS,
test_deps = [
"//third_party/rust_crates/vendor:assert_matches",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:tempfile",
],
with_unit_tests = True,
deps = [
"//src/lib/fuchsia-url",
"//src/sys/pkg/lib/channel-config",
"//src/sys/pkg/lib/eager-package-config",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:omaha_client",
"//third_party/rust_crates/vendor:serde",
],
)
rustc_binary(
name = "gen_eager_package_config",
srcs = ["src/main.rs"],
edition = "2024",
lint_config = "//build/config/rust/lints:clippy_warn_all",
target_compatible_with = HOST_CONSTRAINTS,
test_deps = [
"//src/sys/pkg/lib/eager-package-config",
"//third_party/rust_crates/vendor:tempfile",
],
with_unit_tests = True,
deps = [
":lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:serde_json",
],
)