Should end-user utilities / applications be registered at crates.io?

Is it possible to register generally useful (utilities / applications) on crates.io ?

The FAQ does not apply to this either from viewing, there are examples of applications for end users (mainly command line tools).

Or is it crates.io? intended for libraries only?


I ask about this because the documentation points to the use of the library, semantic version control for the API, etc., but does not refer to the case where packaging applications are explicitly specified.

+5
source share
2 answers

Yes, because you can use cargo install to install and manage these applications throughout the system. If this use was discouraged, I would suspect that the command does not exist at all, or at least has very limited applicability.

Snippet from cargo install --help :

Using:

  cargo install [options] [<crate>] cargo install [options] --list 

[...]

This command manages the local set of installed Cargo binaries. Only packages with targets [[bin]] can be installed, and all binaries are installed in the bin root folder. the installation root is determined in priority order by --root , $CARGO_INSTALL_ROOT , the install.root configuration key, and finally the home directory (which is either $CARGO_HOME if installed or $HOME/.cargo by default).

There are several sources from which the box can be installed. the default location is crates.io, but the --git and --path can change this source. If the source contains more than one package (such as crates.io or a git repository with multiple mailboxes), the <crate> argument should indicate which mailbox should be installed.

+5
source

This should not be the main reason for publishing the application in crates.io, but I list it here because it is still a good reason. :)

The Rust team will sometimes use the crater tool to check regressions for all mailboxes published on crates.io, usually before merging a pull request that has undefined consequences. If you wrote the code that happens with compilation today, but stopped compiling 1 due to bug fixes in the compiler, then they can even send a transfer request to your project, which fixes your code!


1 Usually, when such violations occur, there is at least one previous release in which a warning will be reported before the warning turns into an error.

+1
source

Source: https://habr.com/ru/post/1258868/


All Articles