From 3f3eaa0f08ad4e68eae08f77c58f1588a67e73f6 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Thu, 29 Dec 2022 09:55:25 +0800 Subject: [PATCH] Add `registry.default` example Signed-off-by: hi-rustin --- src/doc/src/reference/registries.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/doc/src/reference/registries.md b/src/doc/src/reference/registries.md index 734da01069e..b7976eaa80a 100644 --- a/src/doc/src/reference/registries.md +++ b/src/doc/src/reference/registries.md @@ -68,7 +68,12 @@ registry to use. For example, to publish the package in the current directory: Instead of always passing the `--registry` command-line option, the default registry may be set in [`.cargo/config.toml`][config] with the `registry.default` -key. +key. For example: + +```toml +[registry] +default = "my-registry" +``` Setting the `package.publish` key in the `Cargo.toml` manifest restricts which registries the package is allowed to be published to. This is useful to