| # 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-rustc", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.media.sounds:fuchsia.media.sounds-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fidl_table_validation", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zerocopy", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| 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" ] |
| } |