blob: 86a6e6e16b6bc1dfcde71ebb35bc2e7ddf50b322 [file] [log] [blame]
# Copyright 2024 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.
import("//build/components.gni")
import("//build/rust/rustc_library.gni")
rustc_library("fuchsia-audio") {
name = "fuchsia_audio"
source_root = "src/lib.rs"
edition = "2021"
# Don't build unit tests on host to avoid depending
# on //src/storage/lib/vfs/rust:vfs.
with_unit_tests = !is_host
deps = [
"//sdk/fidl/fuchsia.audio:fuchsia.audio_rust",
"//sdk/fidl/fuchsia.audio.controller:fuchsia.audio.controller_rust",
"//sdk/fidl/fuchsia.audio.device:fuchsia.audio.device_rust",
"//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.media:fuchsia.media_rust",
"//src/lib/async-utils",
"//src/lib/const-unwrap",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-fs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:camino",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hound",
"//third_party/rust_crates:itertools",
"//third_party/rust_crates:regex",
"//third_party/rust_crates:thiserror",
]
if (!is_host) {
test_deps = [
"//src/lib/fuchsia",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:test-case",
]
}
sources = [
"src/device.rs",
"src/format.rs",
"src/format_set.rs",
"src/lib.rs",
"src/registry.rs",
]
}
fuchsia_unittest_package("fuchsia-audio-tests") {
deps = [ ":fuchsia-audio_test" ]
}
group("rust") {
public_deps = [ ":fuchsia-audio" ]
}
group("tests") {
testonly = true
deps = [ ":fuchsia-audio-tests" ]
}