Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/croconut/crate-add


https://github.com/croconut/crate-add

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# crate-add
Are you annoyed that you have to write to / from a toml file to manage dependency libraries? When you add a crate do you just use the latest version?

same.

crate-add is a bash script to add and remove dependencies for rust projects. Does a lookup and adds the dependency to the toml file and leaves installation / updating to cargo. On add to dev dependencies / dependencies will remove that dependency from the other list.

basic usage:
``` sh
crate-add a #adds and to dependencies
crate-add adev #adds to dev dependencies
crate-add r #removes from dependencies
crate-add rdev #removes from dev dependencies

crate-add build --release #runs cargo build --release
crate-add pass build --release #also runs cargo build --release
crate-add ldev # lists dev dependencies, use l or list for normal dependencies
```

Currently only installs most recent version of the crate, can look into supporting named versions in future.

install with
``` sh
sudo bash -c "install -bm 755 <(wget -qO- 'https://raw.githubusercontent.com/croconut/crate-add/master/crate-add.sh') /usr/local/bin/crate-add"
```