blob: de688bb97f209113551a6ea1757fed4d9cfdc24d [file] [log] [blame]
# Copyright 2023 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_library.gni")
rustc_library("rust") {
name = "fxt"
edition = "2024"
with_unit_tests = true
sources = [
"src/args.rs",
"src/blob.rs",
"src/error.rs",
"src/event.rs",
"src/fxt_builder.rs",
"src/header.rs",
"src/init.rs",
"src/lib.rs",
"src/log.rs",
"src/metadata.rs",
"src/objects.rs",
"src/profiler.rs",
"src/scheduling.rs",
"src/session.rs",
"src/string.rs",
"src/testing.rs",
"src/thread.rs",
]
inputs = [ "//src/performance/trace2json/test_data/simple_trace.fxt" ]
deps = [
"//sdk/rust/zx-types",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-sync",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:flyweights",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:nom",
"//third_party/rust_crates:paste",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//src/lib/fuchsia" ]
}
fuchsia_unittest_package("fxt_unittests") {
deps = [ ":rust_test" ]
}
group("tests") {
testonly = true
deps = [
":fxt_unittests",
":rust_test($host_toolchain)",
"tests",
]
}