blob: 8b3ead25fe9283227b5e3db44498a8880f7b86cf [file] [log] [blame]
# Copyright 2025 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/rust/rustc_library.gni")
# This library is intended to be runnable both on the host and device.
template("trace_task_crate") {
rustc_library(target_name) {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:async-channel",
"//third_party/rust_crates:async-lock",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:thiserror",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:tempfile",
]
if (is_host) {
test_deps += [ "//third_party/rust_crates:async-fs" ]
}
sources = [
"src/lib.rs",
"src/trace_task.rs",
"src/triggers.rs",
]
}
}
trace_task_crate("trace_task") {
deps = [
"//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_rust_flex",
"//src/lib/fdomain/client:flex_fidl",
]
}
trace_task_crate("trace_task_fdomain") {
deps = [
"//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_rust_fdomain_flex",
"//src/lib/fdomain/client:flex_fdomain",
]
}
group("tests") {
testonly = true
deps = [ ":trace_task_test" ]
}