blob: 8f3246f9ebb7647da0348fb8ca7ca1e4e4ded45d [file] [log] [blame]
# Copyright 2019 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_binary.gni")
group("example") {
deps = [ ":soundplayer_example" ]
}
rustc_binary("bin") {
name = "soundplayer_example"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.media:fuchsia.media_rust",
"//sdk/fidl/fuchsia.media.sounds:fuchsia.media.sounds_rust",
"//sdk/fidl/fuchsia.mem:fuchsia.mem_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:zerocopy",
]
sources = [ "src/main.rs" ]
}
resource("data") {
sources = [ "//prebuilt/test_data/media/third_party/chromium_media_test_data/sfx_s16le.wav" ]
outputs = [ "data/sfx.wav" ]
}
fuchsia_component("soundplayer") {
component_name = "soundplayer_example"
manifest = "meta/soundplayer_example.cml"
deps = [
":bin",
":data",
]
}
fuchsia_package("soundplayer_example") {
deps = [ ":soundplayer" ]
}