← WritingTIL

TIL: Running `cargo-flamegraph` With Tauri Apps

A Tauri app is just a Rust-compiled binary. But because the Tauri workflow also involves some frontend development you normally develop your app using something like:

pnpm tauri dev

So when I had to profile my app, it wasn’t immediately obvious how to invoke flamegraph, but it’s really simple:

cargo install flamegraph
pnpm tauri build # use --debug if you want to profile your debug build

flamegraph --root -- /Users/samrat/code/myapp/src-tauri/target/release/myapp

The flamegraph.svg file will be produced once you close your app.


More writing

Full archive
  1. Standalone OpenAI transcription Python script
    Writing · #python— runs cleanly with uv run — no virtualenv needed
  2. Running ML models in Elixir using Pythonx
    Writing · #elixir— Pythonx embeds Python right inside the BEAM
Type to filter posts & pagesFull search page →