You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A project I'm currently working on requires compiling library crates. This is not possible with cargo install. Therefore, the source code first needs to be downloaded and then compiled locally. Cargo currently doesn't provide an interface to do this, which means that the git and registry fetching has to be implemented manually.
Clippy has a tool called lintcheck which fetches defined crates and checks with the current Clippy build. Lintcheck also had to manually implement fetching crates
A user might want to verify the source code of a crate, before including it as a dependency which will run the build script as part of the compilation/check comment.
Manual implementations will probably not be as robust as cargo interface and might introduce security vulnerabilities.
Proposed Solution
Cargo already as infrastructure to fetch from git and from registries like creates.io. I propose to add a new comment, like cargo download that exposes the option to fetch the source into a directory, without anything more.
The command should support arguments to specify dependencies, so:
Git: repository and optionally: branch, revision or tag
Registry: version and optionally: registry
Notes
There is a crate called cargo-download that implemented this as a sub comment. It still gets around ~5 downloads per day. Sadly, it doesn't seam to be maintained anymore.
I believe this is a relatively small feature, that's why I'm only creating an issue. Please let me know if this requires an RFC or if it should be discussed somewhere else.
The text was updated successfully, but these errors were encountered:
Problem
cargo install
. Therefore, the source code first needs to be downloaded and then compiled locally. Cargo currently doesn't provide an interface to do this, which means that the git and registry fetching has to be implemented manually.lintcheck
which fetches defined crates and checks with the current Clippy build. Lintcheck also had to manually implement fetching cratesManual implementations will probably not be as robust as cargo interface and might introduce security vulnerabilities.
Proposed Solution
Cargo already as infrastructure to fetch from git and from registries like creates.io. I propose to add a new comment, like
cargo download
that exposes the option to fetch the source into a directory, without anything more.The command should support arguments to specify dependencies, so:
repository
and optionally:branch
,revision
ortag
version
and optionally:registry
Notes
There is a crate called
cargo-download
that implemented this as a sub comment. It still gets around ~5 downloads per day. Sadly, it doesn't seam to be maintained anymore.I believe this is a relatively small feature, that's why I'm only creating an issue. Please let me know if this requires an RFC or if it should be discussed somewhere else.
The text was updated successfully, but these errors were encountered: