{"id":16189959,"url":"https://github.com/brson/cargo-bake","last_synced_at":"2025-08-30T15:32:01.654Z","repository":{"id":57532613,"uuid":"46531386","full_name":"brson/cargo-bake","owner":"brson","description":"Smarter default optimization settings for Rust + Cargo","archived":false,"fork":false,"pushed_at":"2016-03-10T22:04:26.000Z","size":10,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-15T17:51:16.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-20T01:32:34.000Z","updated_at":"2020-11-10T18:21:07.000Z","dependencies_parsed_at":"2022-09-26T18:22:07.879Z","dependency_job_id":null,"html_url":"https://github.com/brson/cargo-bake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fcargo-bake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fcargo-bake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fcargo-bake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fcargo-bake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brson","download_url":"https://codeload.github.com/brson/cargo-bake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231501580,"owners_count":18386285,"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":[],"created_at":"2024-10-10T07:37:45.216Z","updated_at":"2024-12-27T14:54:09.169Z","avatar_url":"https://github.com/brson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cargo-bake\r\n\r\nCompile Rust faster with smarter defaults. Alternative to `cargo\r\nbuild`. The default bake compiles more quickly than Cargo's\r\n`--release` and produces reasonably fast code.\r\n\r\nUsage:\r\n\r\n```sh\r\n$ cargo install cargo-bake\r\n$ cargo bake \u003cother-cargo-build-options\u003e\r\n```\r\n\r\nThe default (\"normal\") bake produces compiler flags more-or-less\r\nlike\r\n\r\n```\r\n-C opt-level=2\r\n-C inline-threshold=25\r\n-C no-vectorize-loops\r\n-C codegen-units=$NUM_CPUS_UP_TO_4\r\n--link-args=--fuse-ld=gold\r\n-Z no-verify\r\n-C debuginfo=0\r\n```\r\n\r\nBesides the normal bake, `cargo-bake` also accepts a `--fast` bake,\r\nwhich is similar to Cargo's default, a `--slow` bake, similar to\r\nCargo's release, and a `--glacial` bake, which additionally adds LTO.\r\n\r\nBy default cargo-bake, in all modes, reduces debuginfo generation to\r\nline numbers only. Use the `--debug` flag to turn on full debuginfo.\r\n\r\nRun `cargo bake --compare` to compare compile time of `cargo build\r\n--release` to `cargo bake`.\r\n\r\n**Note: cargo-bake requires the 2015-11-23 nightlies or later.**\r\n\r\n## Contributing\r\n\r\nCan you make Rust build faster by tweaking the optimizations? Send me a PR!\r\n\r\n## How fast?\r\n\r\n```\r\nhtml5ever:\r\n\r\ncargo build --release: 27467\r\ncargo bake: 25733\r\n\r\nhyper:\r\n\r\ncargo build --release: 30156\r\ncargo bake: 26743\r\n\r\nregex:\r\n\r\ncargo build --release: 7006\r\ncargo bake: 5078\r\n\r\nimage:\r\n\r\ncargo build --release: 50449\r\ncargo bake: 50928\r\n```\r\n\r\n## Future work\r\n\r\n* Experiment with controlling the exact passes\r\n* Experiment with turning off the alwaysinline pass\r\n\r\n## License\r\n\r\nMIT/Apache-2.0\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrson%2Fcargo-bake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrson%2Fcargo-bake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrson%2Fcargo-bake/lists"}