feat(tokio): profiling

This commit is contained in:
Nova
2023-01-14 10:38:39 -05:00
parent 2f380da62f
commit fd31d0cd99
3 changed files with 12 additions and 1 deletions

2
.cargo/config.toml Normal file
View File

@@ -0,0 +1,2 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]

View File

@@ -51,9 +51,14 @@ features = ["desktop", "renderer_gl", "wayland_frontend"]
version = "*"
optional = true
[dependencies.console-subscriber]
version = "0.1.8"
optional = true
[features]
default = ["wayland"]
wayland = ["dep:smithay", "dep:xkbcommon"]
profile = ["dep:console-subscriber"]
# [patch.crates-io.stereokit]
# path = "../stereokit-rs"

View File

@@ -42,7 +42,11 @@ struct CliArgs {
}
fn main() -> Result<()> {
if !cfg!(feature = "profile") {
tracing_subscriber::fmt::init();
}
#[cfg(feature = "profile")]
console_subscriber::init();
let project_dirs = ProjectDirs::from("", "", "stardust").unwrap();
let cli_args = Arc::new(CliArgs::parse());