@@ -182,14 +182,15 @@ A valid registry index meets the following criteria:
182
182
183
183
``` json
184
184
{
185
- "dl" : " https://my-crates-server.com/api/v1/crates" ,
185
+ "dl" : " https://my-crates-server.com/api/v1/crates/{crate}/{version}/download " ,
186
186
"api" : " https://my-crates-server.com/" ,
187
187
"allowed-registries" : [" https://github.com/rust-lang/crates.io-index" , " https://my-intranet:8080/index" ]
188
188
}
189
189
```
190
190
191
- The ` dl ` key is required specifies where Cargo can download the tarballs containing the source
192
- files of the crates listed in the registry.
191
+ The ` dl ` key is required and specifies where Cargo can download the tarballs containing the source
192
+ files of the crates listed in the registry. It is templated by the strings ` {crate} ` and
193
+ ` {version} ` which are replaced with the name and version of the crate to download, respectively.
193
194
194
195
The ` api ` key is optional and specifies where Cargo can find the API server that provides the
195
196
same API functionality that crates.io does today, such as publishing and searching. Without the
@@ -205,7 +206,9 @@ A valid registry index meets the following criteria:
205
206
- There will be a number of directories in the git repository.
206
207
- ` 1/ ` - holds files for all crates whose names have one letter.
207
208
- ` 2/ ` - holds files for all crates whose names have two letters.
208
- - ` 3/ ` - holds files for all crates whose names have three letters.
209
+ - ` 3/a ` etc - for all crates whose names have three letters, their files will
210
+ be in a directory named ` 3 ` , then a subdirectory named with the first letter
211
+ of their name.
209
212
- ` aa/aa/ ` etc - for all crates whose names have four or more letters, their
210
213
files will be in a directory named with the first and second letters of
211
214
their name, then in a subdirectory named with the third and fourth letters
0 commit comments