{"id":25211482,"url":"https://github.com/m-kus/scarb-burn","last_synced_at":"2025-04-05T06:27:13.472Z","repository":{"id":274968072,"uuid":"924297536","full_name":"m-kus/scarb-burn","owner":"m-kus","description":"🔥 Scarb extension for generating Cairo flamegraphs","archived":false,"fork":false,"pushed_at":"2025-02-17T18:05:10.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T19:24:00.648Z","etag":null,"topics":["cairo","flamegraph","pprof","profiler","scarb","starknet"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-kus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T18:54:19.000Z","updated_at":"2025-02-17T18:05:13.000Z","dependencies_parsed_at":"2025-01-30T13:20:11.499Z","dependency_job_id":"aef4d8c4-3e5a-4f0a-ad59-bd39ba6d0ac5","html_url":"https://github.com/m-kus/scarb-burn","commit_stats":null,"previous_names":["m-kus/scarb-burn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-kus%2Fscarb-burn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-kus%2Fscarb-burn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-kus%2Fscarb-burn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-kus%2Fscarb-burn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-kus","download_url":"https://codeload.github.com/m-kus/scarb-burn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247298365,"owners_count":20916021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cairo","flamegraph","pprof","profiler","scarb","starknet"],"created_at":"2025-02-10T14:16:00.458Z","updated_at":"2025-04-05T06:27:13.448Z","avatar_url":"https://github.com/m-kus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scarb Burn\n\nScarb extension for generating Cairo flame charts and pprof profiles.\n\n![image](https://github.com/user-attachments/assets/c94e3660-1c53-479b-b3b0-ad363cdb01fc)\n\nThis is a complementary tool to [cairo-profiler](https://github.com/software-mansion/cairo-profiler), focused on generic Cairo programs run outside of Starknet context. It is particularly useful if you have a program that consumes a large arguments file.\n\n## Installation\n\nYou need to have Rust installed on your machine.\n\n```bash\ncargo install --git https://github.com/m-kus/scarb-burn scarb-burn\n```\n\n## Usage\n\nRun in your project directory:\n\n```bash\n# Generate flamegraph (default)\nscarb burn --arguments-file arguments.json --output-file flamegraph.svg --open-in-browser\n\n# Generate pprof profile (requires Go toolchain for visualization)\nscarb burn --output-type pprof --output-file profile.pb.gz --arguments-file arguments.json --open-in-browser\n```\n\n## Output Types\n\n- **flamegraph**: Interactive SVG visualization, no additional dependencies required\n- **pprof**: Google's profiling format, requires Go toolchain for visualization but provides more analysis tools\n\n## Notes\n\n- Only `main` entrypoint wrapped with `#[executable]` attribute is supported, you also have to have `[lib]` target in Scarb.toml so that a Sierra file is generated\n- Arguments format is compatible with `scarb execute` but not with `scarb cairo-run`\n- User and corelib as well as libfuncs are counted, providing the most detailed info\n- Loops and recursive calls are collapsed to improve readability\n- `--open-in-browser` opens SVG directly for flamegraphs, starts pprof web UI on port 8000 for pprof files\n- `--no-build` flag to skip rebuilding the package\n\n## Arguments Format\n\nArguments can be provided via file (--arguments-file) or command line (--arguments):\n```json\n[\"0x1234\", \"0x5678\"]  // arguments.json example\n```\n\nNote that main executable wrapper has a single argument of type `Array\u003cfelt252\u003e` containing inner arguments serialized with Cairo Serde.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-kus%2Fscarb-burn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-kus%2Fscarb-burn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-kus%2Fscarb-burn/lists"}