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

Support install directly from git repo #3

Closed
ryankurte opened this issue Dec 14, 2020 · 6 comments · Fixed by #1162
Closed

Support install directly from git repo #3

ryankurte opened this issue Dec 14, 2020 · 6 comments · Fixed by #1162
Labels
Report: feature request New feature request

Comments

@ryankurte
Copy link
Collaborator

Fetch metadata from a git repository to support binary installation of unpublished crates

@somehowchris
Copy link
Contributor

I've seen that gitoxide would be an alternative to git2, @passcod you seem to have an eye on that project for some other things, would it be an option for something like this?

Would this only be for unpublished crates? Or in general something to get metadata from a git repository. i.e. for use at companies with a host such as gh enterprise, bitbucket,... and a binary host such as artifactory? Not that I propose a lock in for host cases but just the general purpose

@NobodyXu
Copy link
Member

Would this only be for unpublished crates? Or in general something to get metadata from a git repository. i.e. for use at companies with a host such as gh enterprise, bitbucket,... and a binary host such as artifactory? Not that I propose a lock in for host cases but just the general purpose

I'm also a little confused about this.

For unpublished crates, one piece of information we need is Cargo.toml, src/main.rs (if present) and anything under src/bins/ if present.

We don't actually care the content of src/main.rs or src/bins/*, but we need these vfs information in order to infer the list of binaries to install.

@passcod
Copy link
Member

passcod commented Aug 24, 2022

Yeah so this would be the same as cargo install --git https://..... Conceptually it would shallow-clone the repo then run as if it was invoked with --manifest-path cloned-repo, plus it would read the manifest and pick the crate name + version out of it if that's not provided on the command line.

@passcod
Copy link
Member

passcod commented Aug 24, 2022

I think with git there's a way in the protocol to only fetch particular files or at least subtrees, which would make it a lot more efficient than cloning the repo, but a shallow clone is a good start.

@mpizenberg
Copy link

Also interested in this as I'd like to avoid pushing my binary crate to crates.io.

NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 21, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 23, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
NobodyXu added a commit that referenced this issue Jun 23, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
github-merge-queue bot pushed a commit that referenced this issue Jun 24, 2023
Fixed #3

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@passcod passcod mentioned this issue Jun 24, 2023
@NobodyXu
Copy link
Member

@ryankurte @somehowchris @mpizenberg cargo-binstall v1.0.0 has released, which support this feature!

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

Successfully merging a pull request may close this issue.

5 participants