Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is ``npm install ../my-another-package'' in Rust's Cargo?

In my Cargo.toml, I defined [dependencies] like:

[dependencies]
my-another-package = "0.0.1"

But I don't want to put my_another_package on GitHub because it is proprietary. I want to install it from my local disk. Using NPM, I would do something like npm install ../my-another-package.

like image 625
Vee Satayamas Avatar asked Oct 17 '25 20:10

Vee Satayamas


1 Answers

You want what Cargo calls a "path dependency":

[dependencies.my-another-package]
path = "path/to/my-another-package"
like image 84
Shepmaster Avatar answered Oct 21 '25 00:10

Shepmaster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!