Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easier way to add crates in cargo #6457

Closed
mrwanashraf opened this issue Dec 18, 2018 · 4 comments
Closed

easier way to add crates in cargo #6457

mrwanashraf opened this issue Dec 18, 2018 · 4 comments

Comments

@mrwanashraf
Copy link

Describe the problem you are trying to solve

I'm new to rust and i came from javascript/nodejs background,
for me i use npm to install packages using npm install package_name.

as I was exploring rust i learnt about cargo and crates.io.
and i found that the way to install crates in cargo is through going to crates.io searching for the package then adding it manually to cargo.toml.
that takes lots of time when you wanna add crate(s) and therefore it impacts the developer's productivity.

Describe the solution you'd like

is it possible for this feature to be implemented in cargo as well?

to run a command like
cargo add crate_name
or
cargo install crate_name

then cargo fetches the crate_name version adds it to the cargo.toml file and finally adds the crate to the project?

@dwijnand
Copy link
Member

Welcome to Rust! You're looking for the https://github.com/killercup/cargo-edit/ extension of Cargo, which we'll on the way to merging into cargo proper.

@mrwanashraf
Copy link
Author

@dwijnand thanks! ^^, it's interesting to see what I'm requesting is being in the process of merging. can't wait to use it in cargo when its officially merged.

@dwijnand
Copy link
Member

You can track that effort in #5586, if you'd like.

@mrwanashraf
Copy link
Author

i will , thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants