blob: aff960be081bb5c73aef6e141e212cca78c231b8 [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/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "ffx_audio_common",
srcs = ["src/lib.rs"],
edition = "2024",
# Uncomment this line, to enable all lints during local development.
# (GN: configs += [ "//build/config/rust/lints:clippy_warn_all" ])
# lint_config = "//build/config/rust/lints:clippy_warn_all",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = [
"//src/developer/ffx/plugins/audio/device:__pkg__",
"//src/developer/ffx/plugins/audio/play:__pkg__",
"//src/developer/ffx/plugins/audio/record:__pkg__",
],
deps = [
"//sdk/fidl/fuchsia.audio.controller:fuchsia.audio.controller_rust_fdomain",
"//src/developer/ffx/lib/futures:lib",
"//src/developer/ffx/lib/target/holders:lib",
"//src/developer/ffx/lib/timeout:lib",
"//src/lib/fdomain/client",
"//src/lib/fuchsia-async",
"//src/media/audio/lib/rust:fuchsia_audio_fdomain",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:blocking",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:serde",
],
)
host_rustc_test(
name = "ffx_audio_common_test",
crate = ":ffx_audio_common",
edition = "2024",
visibility = ["//src/developer/ffx:__pkg__"],
)