blob: c9ad59c4e3980979e82d8a0ade1f440a178fd855 [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/components:fx_component.bzl",
"fx_component",
"fx_component_manifest",
)
load(
"//build/bazel/rules/packages:fx_packaged_binary.bzl",
"fx_packaged_binary",
)
load("//build/bazel/rules/rust:rustc_binary.bzl", "rustc_binary")
package(default_applicable_licenses = ["//:license"])
rustc_binary(
name = "bin",
testonly = True,
srcs = ["src/main.rs"],
binary_name = "ext4_test_server",
edition = "2024",
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.storage.block:fuchsia.storage.block_rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-runtime",
"//src/storage/ext4/lib/parser",
"//src/storage/lib/block_server/vmo_backed:test_vmo_backed_block_server",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:log",
],
)
fx_packaged_binary(
name = "ext4_test_server_packaged_bin",
testonly = True,
binary = ":bin",
binary_name = "ext4_test_server",
)
fx_component_manifest(
name = "manifest",
testonly = True,
component_name = "server",
includes = [
"//sdk/lib/inspect:client.shard",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/server.cml",
)
fx_component(
name = "server",
testonly = True,
compiled_manifest = ":manifest",
visibility = ["//src/starnix/tests/syscalls/cpp:__pkg__"],
deps = [":ext4_test_server_packaged_bin"],
)