最终用户实用程序/应用程序是否应该在 crates.io 上注册? [英] Should end user utilities/applications be registered on crates.io?

查看:42
本文介绍了最终用户实用程序/应用程序是否应该在 crates.io 上注册?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

crates.io 上注册普遍有用的(实用程序/应用程序)是否可以接受?

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

FAQ 没有解决这个问题,从浏览来看,有一些最终用户的例子应用程序(主要是命令行工具).

The FAQ doesn't address this and from browsing, there are examples of end-user applications (mostly command line tools).

或者是 crates.io?仅适用于图书馆?

Or is crates.io? meant only for libraries?

我之所以这么问是因为文档暗示了库的使用、API 的语义版本控制等,但没有明确提及打包应用程序的情况.

I'm asking this because the documentation hints at library use, semantic versioning for API's etc. but doesn't reference the case for packaging applications explicitly.

推荐答案

是的,因为您可以使用 cargo install 在系统范围内安装和管理这些应用程序.如果不鼓励这种使用,我会怀疑该命令根本不存在,或者至少具有非常有限的适用性.

Yes, because you can use cargo install to install and manage those applications system-wide. If this use were discouraged, I would suspect that command to not exist at all, or at least have a very limited applicability.

来自 cargo install --help 的片段:

用法:

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

[...]

此命令管理 Cargo 的本地安装二进制包.只能安装具有 [[bin]] 目标的包,并且所有二进制文件安装到安装根目录的 bin 文件夹中.这安装根由 --root 按优先顺序确定,$CARGO_INSTALL_ROOTinstall.root 配置键,以及最后是主目录(如果设置为 $CARGO_HOME$HOME/.cargo 默认).

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

可以从多个来源安装板条箱.这默认位置是 crates.io 但 --git--path 标志可以改变这个来源.如果源包含多个包(例如作为 crates.io 或具有多个 crate 的 git 存储库)需要参数来指示应该安装哪个板条箱.

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

这篇关于最终用户实用程序/应用程序是否应该在 crates.io 上注册?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆