blob: bda6ad00b705a3bdf3b418a979127321d2d09828 [file]
# Copyright 2026 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.
load(
"//build/bazel/rules/components:fx_component.bzl",
"fx_component",
"fx_component_manifest",
)
load(
"//build/bazel/rules/packages:fx_packaged_binary.bzl",
"fx_packaged_binary",
)
load("//build/bazel/rules/rust:rustc_binary.bzl", "rustc_binary")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "lib",
testonly = True,
srcs = [
"src/lib.rs",
"src/presentation_loop.rs",
"src/view.rs",
],
crate_name = "ui_puppet_lib",
edition = "2024",
deps = [
"//sdk/fidl/fuchsia.math:fuchsia.math_rust",
"//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_rust",
"//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_rust",
"//sdk/fidl/fuchsia.ui.pointer:fuchsia.ui.pointer_rust",
"//sdk/fidl/fuchsia.ui.test.conformance:fuchsia.ui.test.conformance_rust",
"//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_rust",
"//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_rust",
"//sdk/rust/zx",
"//src/lib/async-utils",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/ui/flatland-frame-scheduling:flatland-frame-scheduling-lib",
"//src/lib/ui/fuchsia-scenic",
"//third_party/rust_crates/vendor:euclid",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:log",
],
)
rustc_binary(
name = "bin",
testonly = True,
srcs = ["src/main.rs"],
crate_name = "ui_puppet_bin",
edition = "2024",
tags = ["manual"],
deps = [
":lib",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:log",
],
)
fx_packaged_binary(
name = "bin_packaged",
testonly = True,
binary = ":bin",
binary_name = "ui_puppet_bin",
)
fx_component_manifest(
name = "ui-puppet-component_manifest",
testonly = True,
component_name = "ui-puppet",
includes = [
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/ui-puppet.cml",
)
fx_component(
name = "ui-puppet-component",
testonly = True,
compiled_manifest = ":ui-puppet-component_manifest",
visibility = ["//src/ui/tests/conformance_input_tests:__pkg__"],
deps = [":bin_packaged"],
)