Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The cargo bin subcommand provides some operations to manage binaries in Cargo.toml.

License

Notifications You must be signed in to change notification settings

gensmusic/cargo-bin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargo-bin

github crates.io Rust

The cargo bin subcommand provides some operations to manage binaries in Cargo.toml.

install

# install
cargo install cargo-bin

usage

new

Create a new binary main file and add into Cargo.toml.

Create a new binary abc and add into Cargo.toml. The following will create a file abc.rs with a default fn main() in current folder. And a [[bin]] will be added into the Cargo.toml.

cd src
cargo bin new abc
# or
cargo bin new abc.rs

The Cargo.toml file.

[[bin]]
name = "abc"
path = "src/abc.rs"

tidy

cargo bin tidy will add all .rs file with a main function into Cargo.toml. It will also clean up all the invalid [[bin]]s which doesn't exists.

cargo bin tidy

About

The cargo bin subcommand provides some operations to manage binaries in Cargo.toml.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages