-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feature: install from manifest #176
Comments
Perhaps we can add that as a subcommand and make |
Are you concerned about size? I was just thinking of having two binaries. |
Yes. I don't think we can simply invoke |
I don't mind a multi-call, but on windows we'll still need to distribute two (identical) binaries, I think. Probably the best we can do without going down the path of shipping a dynlib along. Also not entirely sure how multicall binaries work in the cargo context, especially with the |
It seems that the user would have to create the symlink themselves in these cases.
|
Right, well, that's not a great experience. I wonder if we could rig it such that it defaults to two binaries, but produces a multicall given a feature. That way we can generate prebuilds with the smaller multicall setup, and |
I think we can create bins/cargo-tools.rs and bins/cargo-binstall.rs which simply call the multicall main. Since the binary is named cargo-tools, multicall would resolve to call the right "main". |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
The extra information it contains and requires is nonsensical for Binstall. Instead of faking the details, which could potentially be harmful to cargo-install, we will drop support for v2 and only write to v1. Later we will add support for our own manifest and lockfile format that carries relevant information for Binstall and fills some other gaps these manifests do not, like local installs. See cargo-bins#176.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
ooh, i like the idea of this! would it be too self important to call this |
hey thinking about this a bit more, how do you manage multiple projects with different tool requirements? it feels like a global manifest is a different problem to a per-project manifest (whether that's at a crate or workspace level), particularly given projects could have different tool version requirements. if you want a -project- to be able to specify required tools it might be plausible to add a tag in |
Yeah, the way I was thinking is that in project mode, we install to a directory inside the project, so it's completely separate from the global installs. There's no convention in rust to have a project-local bin folder that the tooling uses like in Node ( |
There's also the cargo xtask pattern, but I'm not sure if we could reasonably use that or hook into it for anything. |
Implemented by (third party project) cargo-run-bin, see #1514. |
Make a new manifest that specifies a list of crates/tools to be installed. The intent is both to keep a system/user-wide list of tools with versions for local use, and also a list of project-specific tools in a format that can be checked into version control. There should also be a lockfile, for the same mechanism as Cargo deps: version requirements in the manifest, and exact versions in the lockfile.
I think this would be highly valued, and generally be very useful, not just for cargo projects.
I propose
(and am working on)the following:cargo tools
(acargo-tools
crate exists, but isn't used).Tools.kdl
, and its NLJSON lockfile,Tools.lock
cargo tools
would print the status (what's installed, what isn't, what can be updated, what can be removed) and an interactive prompt to do something about it (choices: install as lockfile, update compatible, update breaking, do nothing). That way 90% of the time all you want to do is runcargo tools
.cargo tools add
,cargo tools rm
,cargo tools install
,cargo tools update
,cargo tools init
,cargo tools status
, etcManifest:
A typical manifest could look like:
Sample of lockfile (pretty-printed for readability, each top level object would be its own line):
It's not practical to look for and download all available targets, so only the ones that are installed by the host / runner are written to the lockfile. When a user on a different host target runs
cargo install
, new files are downloaded and added to the lockfile; this prints a warning/notice to the console. If running with--locked
, this causes an error instead.--keep-version
is the middle ground, allowing versions to be kept exactly the same as locked, but new files to be downloaded if their target is not in the lockfile already.The text was updated successfully, but these errors were encountered: