{"id":23418554,"url":"https://github.com/rustshop/cargo-deluxe","last_synced_at":"2025-04-12T11:33:16.986Z","repository":{"id":257923226,"uuid":"872707793","full_name":"rustshop/cargo-deluxe","owner":"rustshop","description":"A wrapper around `cargo` adding some useful capabilities","archived":false,"fork":false,"pushed_at":"2024-10-18T23:13:26.000Z","size":33,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T06:11:48.114Z","etag":null,"topics":["cargo","rust","tool"],"latest_commit_sha":null,"homepage":"","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/rustshop.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-14T23:40:52.000Z","updated_at":"2025-01-28T07:48:08.000Z","dependencies_parsed_at":"2024-12-23T00:20:36.965Z","dependency_job_id":"c536fc32-571f-4203-b3ca-decfd105a9b9","html_url":"https://github.com/rustshop/cargo-deluxe","commit_stats":null,"previous_names":["rustshop/cargo-deluxe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustshop%2Fcargo-deluxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustshop%2Fcargo-deluxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustshop%2Fcargo-deluxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustshop%2Fcargo-deluxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustshop","download_url":"https://codeload.github.com/rustshop/cargo-deluxe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560145,"owners_count":21124601,"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":["cargo","rust","tool"],"created_at":"2024-12-23T00:20:19.399Z","updated_at":"2025-04-12T11:33:16.967Z","avatar_url":"https://github.com/rustshop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `cargo-deluxe`\n\n`cargo-deluxe` is a seamless wrapper over Rust's `cargo`, altering (enhancing)\nits functionality.\n\nThis project is a clean reimplementation of a bunch of shell script wrappers and\nhacks that I keep needing in dev environments and CIs of Rust projects I work\nwith.\n\n## Status\n\nThis is primarily a private project that supports a couple of dev teams and\nour projects. But as long as this goal is not compromised, and I'm happy to\nsupport external users as well as I can.\n\nIt's a direct rewrite of shell scripts that we've been using for more than a\nyear now.\n\nIf you're planning to use it, please expect some rough edges. The source code\nis small and simple.\n\n## Installing\n\nThis repo is a standard Rust project, with a Nix flake included. If you're thinking\nabout using it, you should know how to handle it already.\n\n## Debugging\n\nSet `env RUST_LOG=cargo-deluxe=trace` for some basic logging.\n\n## Setting up\n\n`cargo-delux` provides `cargo` and `rustc` binaries, that need to be added\nto the `PATH` **before** the original ones from the Rust toolchain.\n\n`cargo` wrapper binary uses a neat interception logic to look up all `cargo`\nbinaries in the PATH, and call the one after itself. See `bin-intercept` crate\nfor the implementation.\n\n\n## Enhancements\n\n### Package and bin specific build target directories\n\nIn teams working on larger projects, over and over we see users wasting a\nlot of time rebuilding large chunks of the Rust project, because they don't\nrealize that every time they use `-p`, `--package` or `--bin`, the set of\ndependencies changes, which causes `cargo` to rebuild a lot of dependencies.\n\n`cargo-deluxe` will detect such invocations and seamlessly use separate\nbuild target directories for different combinations of them. This potentially\nleads to higher disk usage, but that's easier to reason and mitigate for\nmost developers.\n\n\n## `CARGO_DENY_BUILD` to avoid accidental re-compilations.\n\nIn a sane and well-designed CI pipeline, one of the first steps is building the source\ncode, after which point no invocation of `cargo` should require any further compilation.\nAccidentally breaking this structure can cause surprising and hard to debug issues. E.g.\nparallelized `cargo test` invocations to run a subset of test, would easily overwhelm\nthe building system if they all started to re-compile the project.\n\nWith `cargo-delux`, setting `CARGO_DENY_BUILD=1` will cause all `cargo` commands that\nwould lead to compilation to return an error immediately.\n\n## Target-specific env variables\n\nA lot `-sys` dependencies require setting various environment variables to control\nthe compilation process. Unfortunately oftentimes different target architectures\nrequire different settings, with the `build.rs` script of the `-sys` dependency\nimplementing no ability to set them independently.\n\nWith `cargo-deluxe`, it is possible to set:\n\n```\nCARGO_TARGET_SPECIFIC_ENVS=FOO_target,BAR_target_BAZ\nFOO_x86_64_unknown_linux_gnu=bar\nBAR_aarch64_linux_android_BAZ=woo\n```\n\nThis will cause `FOO=bar` only when compiling for x86_64 architecture target,\nand `BAR_BAZ=woo` when compiling for aarch64 android target.\n\n\n## Further extensions possible\n\nNow that I have a reusable and easy to extend implementation, I might\nadd various other features, similar to [\"Cargo presets\"](https://internals.rust-lang.org/t/pre-rfc-presets-for-cargo/20527), etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustshop%2Fcargo-deluxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustshop%2Fcargo-deluxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustshop%2Fcargo-deluxe/lists"}