-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
From the install docs (permalink) requirement listed are:
- Git - for fetching available versions/tags
- tar, unzip, gz, xz - for unpacking archives
I believe some Rust based CLI tools that have similar functionality (cargo-binstall perhaps?) are capable of doing all that functionality within Rust.
Would you be open towards removing these external deps? (assuming that doesn't bloat the binary size)
Reference:
gitsupport (implemented in this repo)- Archive support (implemented via separate
starbase_archivecrate dep using these features)
NOTE: The utility of this request is perhaps niche given most systems would typically have these deps available. I was interested in producing a minimal OCI image but depending on the base image/distro (if any), adding the required external deps can bring in a bunch of other packages/weight that isn't necessary for proto specifically.
It would seem that to satisfy this request:
- Adopt a Rust implementation of the
gitfunctionality used. Possible candidates:gitoxide_core/gix?- Reference: Docs for
gix::clone, or friendliergitoxide_core::repository::clone(EDIT: Nevermind,gitoxide_coreappears that it is only intended for internal use by thegixCLI bin). - Unfortunately it's a bit low-level with
gixdirectly, would need to engage in upstream forgitoxide_coreif wanting to avoid the added verbosity/noise of interacting directly withgixvs current implementation inproto.
- Reference: Docs for
asyncgit(Repo README is being developed by thegituiCLI project to oxidize their usage ofgit2by migrating togix(git2provides API via bindings tolibgitinstead of calling CLI commands like proto does (due to static builds)), howeverasyncgitdoesn't quite seem to have the coverage you'd need yet, and theirCargo.tomlshows it still brings ingit2due to the transition (presumably the crate will continue to provide an API to bothgit2+gixbackends, but could be optimized with feature config to opt-out ofgit2deps).
starbase_archivewould likely need astaticfeature or similar functionality (this can require some care, I can provide reference/insights from some involvement withzlib-sys). This could then be used (optionally if it makes sense) withproto, where if binary size doesn't go up too much it could be suitable as a default, otherwise compile-time opt-in.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels