blob: 3e7255b5a9331d8f12738935a63f14564d62c672 [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/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
fidl("test.inputsynthesis") {
testonly = true
sources = [ "input_synthesis.test.fidl" ]
public_deps = [ "//sdk/fidl/fuchsia.input.report" ]
enable_hlcpp = true
}
rustc_library("input-synthesis") {
name = "input-synthesis"
with_unit_tests = true
version = "0.1.0"
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.input:fuchsia.input_rust",
"//sdk/fidl/fuchsia.input.injection:fuchsia.input.injection_rust",
"//sdk/fidl/fuchsia.input.report:fuchsia.input.report_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_rust",
"//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/ui/keymaps",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:test-case",
]
sources = [
"src/lib.rs",
"src/modern_backend/input_device.rs",
"src/modern_backend/input_device_registry.rs",
"src/modern_backend/input_reports_reader.rs",
"src/modern_backend/mod.rs",
"src/synthesizer.rs",
]
}
rustc_binary("input-synthesis-bin") {
output_name = "input_synthesis_bin"
testonly = true
edition = "2021"
deps = [
":input-synthesis",
":test.inputsynthesis_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("input-synthesis-component") {
testonly = true
manifest = "meta/input-synthesis.cml"
deps = [ ":input-synthesis-bin" ]
}
fuchsia_unittest_package("input-synthesis-tests") {
deps = [ ":input-synthesis_test" ]
}
group("tests") {
testonly = true
deps = [ ":input-synthesis-tests" ]
}