This commit is contained in:
Robin Appelman 2024-07-28 14:31:52 +02:00
commit e89f5c17f6
2 changed files with 8 additions and 1 deletions

View file

@ -103,7 +103,7 @@
releaseMatrix = buildMatrix releaseTargets; releaseMatrix = buildMatrix releaseTargets;
devShells.default = mkShell { devShells.default = mkShell {
nativeBuildInputs = with pkgs; [msrvToolchain rustc bacon cargo-msrv cargo-insta]; nativeBuildInputs = with pkgs; [msrvToolchain rustc bacon cargo-msrv cargo-insta samply];
}; };
} }
) )

View file

@ -24,6 +24,9 @@ mod ui;
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
struct Args { struct Args {
file: String, file: String,
/// Collect data and exit, intended for profiling
#[arg(long)]
profile: bool,
} }
fn main() -> MainResult { fn main() -> MainResult {
@ -111,6 +114,10 @@ fn main() -> MainResult {
log_file: Mutex::new(log_file), log_file: Mutex::new(log_file),
}; };
if args.profile {
return Ok(());
}
run_ui(app)?; run_ui(app)?;
Ok(()) Ok(())