简体   繁体   English

什么是Rust's Cargo中的``npm install ../my-another-package''?

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

In my Cargo.toml, I defined [dependencies] like: 在我的Cargo.toml中,我定义了[dependencies]例如:

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

But I don't want to put my_another_package on GitHub because it is proprietary. 但是我不想将my_another_package放在GitHub上,因为它是专有的。 I want to install it from my local disk. 我想从本地磁盘安装它。 Using NPM, I would do something like npm install ../my-another-package . 使用NPM,我会做类似npm install ../my-another-package

You want what Cargo calls a "path dependency" : 您需要Cargo所谓的“路径依赖”

[dependencies.my-another-package]
path = "path/to/my-another-package"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM