tracing_android_trace/lib.rs
1// Copyright 2024 the Android Trace Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4// https://linebender.org/blog/doc-include
5//! [`tracing`]: tracing
6//! [tracing_subscriber::filter]: tracing_subscriber::filter
7//! [`tracing_subscriber`]: tracing_subscriber
8//! [`tracing_subscriber::Layer`]: tracing_subscriber::Layer
9//! [`AndroidTraceLayer`]: AndroidTraceLayer
10//! [`AndroidTraceAsyncLayer`]: AndroidTraceAsyncLayer
11//! [`android_trace`]: android_trace
12// File links are not supported by rustdoc
13//! [LICENSE-APACHE]: https://github.com/linebender/android_trace/blob/main/LICENSE-APACHE
14//! [LICENSE-MIT]: https://github.com/linebender/android_trace/blob/main/LICENSE-MIT
15//!
16//! <style>
17//! .rustdoc-hidden { display: none; }
18//! </style>
19#![doc = include_str!("../README.md")]
20#![forbid(unsafe_code)]
21
22#[cfg(not(target_os = "android"))]
23compile_error!(
24 r#"tracing_android_trace only supports Android. If you are depending on it, ensure that it is within
25[target.'cfg(target_os = "android")'.dependencies]
26in your Cargo.toml"#
27);
28
29#[cfg(target_os = "android")]
30pub use android_trace;
31
32#[cfg(target_os = "android")]
33mod async_layer;
34#[cfg(target_os = "android")]
35pub use async_layer::AndroidTraceAsyncLayer;
36
37#[cfg(target_os = "android")]
38mod sync_layer;
39#[cfg(target_os = "android")]
40pub use sync_layer::AndroidTraceLayer;
41
42// TODO: pub use some_mod::ATraceCounterLayer;