# ๐Ÿงน cargo-kit ```text _ _ _ ___ __ _ _ __ __ _ ___ | | __(_)| |_ / __| / _` || '__| / _` | / _ \ | |/ /| || __| | (__ | (_| || | | (_| || (_) | | < | || |_ \___| \__,_||_| \__, | \___/ |_|\_\|_| \__| |___/ ``` This tool automates that setup process, making configuration simpler and faster. ## โœจ Features `cargo-kit` can create or modify Cargo profiles in your `Cargo.toml` manifest and RUSTFLAGS in the [`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#configuration-format) file, based on a set of predefined templates: - `fast-compile` - minimizes compilation times - Disables debuginfo generation and uses a faster linker. - In nightly mode, it also enables the [Cranelift codegen backend](https://nnethercote.github.io/perf-book/build-configuration.html#cranelift-codegen-back-end) and the [parallel frontend](https://nnethercote.github.io/perf-book/build-configuration.html#experimental-parallel-front-end). - `fast-runtime` - maximizes runtime performance - Enables [LTO](https://doc.rust-lang.org/cargo/reference/profiles.html#lto) and other settings designed to maximize runtime performance. - `min-size` - minimizes binary size - Similar to `fast-runtime`, but uses optimization flags designed for small binary size. You can also modify these templates in the interactive mode to build your own custom template. ## ๐Ÿš€ Installation To install **cargo-kit**, simply clone the repository and follow the instructions below: ```bash git clone git@github.com:trinhminhtriet/cargo-kit.git cd cargo-kit cargo install --path . ``` Running the below command will globally install the `cargo-kit` binary. ```bash cargo install cargo-kit ``` Optionally, you can add `~/.cargo/bin` to your PATH if it's not already there ```bash echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc source ~/.bashrc ``` ## ๐Ÿ’ก Usage - Interactive mode (CLI dialog that guides you through the process): ```bash $ cargo kit ``` - Non-interactive mode (directly apply a predefined template to your Cargo workspace): ```bash $ cargo kit apply