rust-performance

Profile native Rust code on Android with simpleperf and Perfetto.

58|4|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/po4yka/RIPDPI --skill rust-performance-po4yka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-performance
Source: https://github.com/po4yka/RIPDPI/tree/main/.claude/skills/rust-performance
Command: npx skills add https://github.com/po4yka/RIPDPI --skill rust-performance-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Profile and optimize performance of native Rust code on Android across multiple crates, helping you locate CPU hotspots, optimize codegen, and reduce binary size.

Core Features & Use Cases

  • On-device profiling with simpleperf and Perfetto across multiple crates and targets.
  • Binary size analysis with cargo-bloat and monomorphization exploration with cargo-llvm-lines.
  • Build-time optimization guidance covering LTO/codegen-units and sccache tuning.
  • Benchmarking and regression analysis with Criterion benchmarks in ripdpi-bench.

Quick Start

Run an on-device profiling session for your Android Rust targets using simpleperf or Perfetto to generate flamegraphs and size reports and identify hotspots for optimization.

Frequently Asked Questions about rust-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile native Rust code performance on Android devices?

Profile native Rust code on Android using simpleperf and Perfetto to generate flamegraphs, identify CPU hotspots, and analyze build-time considerations across multiple crates and targets.

What's the best way to analyze binary size bloat in an Android Rust project?

Analyze binary size using cargo-bloat to identify large functions and cargo-llvm-lines to explore monomorphization, helping you reduce the final footprint of native Rust code on Android targets.

Can I run Criterion benchmarks for Rust code targeting Android?

Yes, you can run Criterion benchmarks within the ripdpi-bench setup to measure performance and conduct regression analysis for native Rust code compiled for Android targets.

Do I need specific Cargo profiles to optimize Rust build time and codegen for Android?

Yes, you need Android toolchains and specific Cargo profiles like android-jni or android-jni-dev to apply LTO, tune codegen-units, and utilize sccache for build-time optimization.

How does monomorphization affect Rust binary size on Android?

Monomorphization generates specialized code for each generic instantiation, increasing binary size; you can explore and mitigate this expansion using cargo-llvm-lines during your profiling workflow.

What tools are required to gather actionable profiling results for Android Rust targets?

Gathering actionable results requires Android toolchains, host and device profiling tools like simpleperf and Perfetto, and Cargo profiles configured for android-jni environments.