| # Copyright 2022 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. |
| |
| # This file was generated by the `fx create` command. The template |
| # is located at `//tools/create/templates/component-default/BUILD.gn.tmpl-rust`. |
| # If you find something broken, we are eager to review fixes. |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":audio_ffx_daemon_unittests" ] |
| } |
| |
| rustc_binary("bin") { |
| output_name = "audio_ffx_daemon" |
| edition = "2021" |
| with_unit_tests = true |
| |
| 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.media:fuchsia.media_rust", |
| "//sdk/fidl/fuchsia.media.audio:fuchsia.media.audio_rust", |
| "//sdk/fidl/fuchsia.ultrasound:fuchsia.ultrasound_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-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//src/media/audio/lib/rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hound", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:assert_matches" ] |
| |
| sources = [ |
| "src/capturer.rs", |
| "src/clock.rs", |
| "src/device.rs", |
| "src/error.rs", |
| "src/main.rs", |
| "src/renderer.rs", |
| "src/ring_buffer.rs", |
| "src/wav_socket.rs", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "audio_ffx_daemon" |
| manifest = "meta/audio_ffx_daemon.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("audio_ffx_daemon") { |
| visibility = [ "//bundles/assembly/*" ] |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_test_component("unittests_component") { |
| component_name = "audio_ffx_daemon_unittests" |
| manifest = "meta/audio_ffx_daemon_unittests.cml" |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("audio_ffx_daemon_unittests") { |
| test_components = [ ":unittests_component" ] |
| } |