Skip to content

Kobzol/cargo-wizard

Repository files navigation

cargo-wizard Build Status Latest Version

Cargo subcommand that applies predefined Cargo profile templates to get you up to speed quickly.

Motivation

I often see Rust users asking online how can they best configure Cargo get e.g. the fastest compilation times, best runtime performance or minimal binary size. While this information can be found in various books, repositories or blog posts, it is annoying to hunt for it everytime we want to configure a new Cargo project.

This tool tries to automate that process to make it easier.

Installation

$ cargo install cargo-wizard

Usage

# Create or modify a Cargo profile based on a template
$ cargo wizard apply dist fast-runtime

Features

cargo-wizard can create or modify Cargo profiles in your Cargo.toml manifest (and also other configuration in the .cargo/config.toml file) based on a set of prepared templates:

  • fast-compile - profile template that tries to minimize compilation times
  • fast-runtime - profile template that tries to maximize runtime performance
  • min-size - profile template that tries to minimize binary size

It uses the incredible toml_edit crate to keep original formatting of the modified TOML files.

Inspiration

Contributions

Contributions are welcome :)

License

MIT

About

Cargo subcommand for configuring Cargo projects for best performance.

Topics

Resources

License

Stars

Watchers

Forks

Languages