| # 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 = "serve_processargs", | |
| srcs = [ | |
| "src/lib.rs", | |
| "src/namespace.rs", | |
| ], | |
| edition = "2024", | |
| visibility = ["//src/sys/component_manager:__subpackages__"], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.component.runtime:fuchsia.component.runtime_rust", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-fs", | |
| "//src/lib/fuchsia-runtime", | |
| "//src/storage/lib/vfs/rust:vfs", | |
| "//src/sys/component_manager/lib/router_error", | |
| "//src/sys/lib/cm_types", | |
| "//src/sys/lib/namespace", | |
| "//src/sys/lib/runtime_capabilities", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:log", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "serve_processargs_test", | |
| crate = ":serve_processargs", | |
| edition = "2024", | |
| deps = [ | |
| "//sdk/rust/zx", | |
| "//src/lib/fdio/rust:fdio", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:assert_matches", | |
| "//third_party/rust_crates/vendor:test-case", | |
| ], | |
| ) | |
| # Run with `fx test serve_processargs_unittests`. | |
| fx_unittest_package( | |
| name = "serve_processargs_unittests", | |
| unit_tests = [":serve_processargs_test"], | |
| ) |