blob: a25ffbe5761c60919d460b66033b6247d7731c81 [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("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test")
load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "context-authenticator",
srcs = ["src/lib.rs"],
edition = "2024",
lint_config = "//build/config/rust/lints:clippy_warn_all",
visibility = [
"//src/sys/component_manager:__pkg__",
"//src/sys/pkg:__subpackages__",
],
deps = [
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/sys/pkg/lib/fuchsia-hash",
"//third_party/rust_crates/vendor:hmac",
"//third_party/rust_crates/vendor:rand",
"//third_party/rust_crates/vendor:sha2",
"//third_party/rust_crates/vendor:thiserror",
],
)
# @bazel2gn:skip
rustc_test(
name = "context-authenticator_test",
crate = ":context-authenticator",
edition = "2024",
lint_config = "//build/config/rust/lints:clippy_warn_all",
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:assert_matches",
],
)
# @bazel2gn:skip
fx_unittest_package(
name = "context-authenticator-tests",
unit_tests = [":context-authenticator_test"],
)