| # 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/rust:defs.bzl", "rustc_library") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "fxt-layout", | |
| srcs = ["src/layout.rs"], | |
| crate_root = "src/layout.rs", | |
| edition = "2024", | |
| visibility = [ | |
| "//zircon/kernel/lib/ktrace:__pkg__", | |
| ], | |
| with_host_unit_tests = True, | |
| deps = [ | |
| "//src/lib/bitrs", | |
| "//third_party/rust_crates/vendor:zerocopy", | |
| ], | |
| ) | |
| rustc_library( | |
| name = "rust", | |
| srcs = [ | |
| "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", | |
| ], | |
| compile_data = [ | |
| "//src/performance/trace2json/test_data:simple_trace.fxt", | |
| ], | |
| crate_name = "fxt", | |
| edition = "2024", | |
| proc_macro_deps = [ | |
| "//third_party/rust_crates/vendor:paste", | |
| ], | |
| test_deps = [ | |
| "//src/lib/fuchsia", | |
| ], | |
| visibility = [ | |
| "//src/developer/ffx/lib/profiler:__pkg__", | |
| "//src/developer/ffx/plugins/trace:__pkg__", | |
| "//src/developer/ffx/tools/profiler:__pkg__", | |
| "//src/performance/fxtdump:__pkg__", | |
| "//src/performance/lib/fxt/rust/tests:__subpackages__", | |
| "//src/starnix/kernel/core:__pkg__", | |
| "//src/starnix/modules/perfetto_consumer:__pkg__", | |
| "//src/starnix/tests/diagnostics/correct_pid:__pkg__", | |
| ], | |
| with_unit_tests = True, | |
| deps = [ | |
| ":fxt-layout", | |
| "//sdk/rust/zx-types", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-sync", | |
| "//third_party/rust_crates/vendor:bitfield", | |
| "//third_party/rust_crates/vendor:bstr", | |
| "//third_party/rust_crates/vendor:flyweights", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:nom", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| "//third_party/rust_crates/vendor:zerocopy", | |
| ], | |
| ) |