Crates.io | freighter-registry |
lib.rs | freighter-registry |
version | 0.3.0 |
source | src |
created_at | 2023-12-25 06:30:14.063897 |
updated_at | 2023-12-25 06:30:14.063897 |
description | The Freighter's purpose is to help the community and company to build the proxy for crates.io and the registry for the development environment. |
homepage | https://github.com/open-rust-Initiative/freighter |
repository | https://github.com/open-rust-Initiative/freighter |
max_upload_size | |
id | 1080074 |
size | 209,671 |
The Freighter's purpose is to help the community and company to build the proxy for crates.io and the registry for the development environment.
When developing a program using Rust in a company, we need to host a proxy for crates.io and private crates registry for the following reasons:
Freighter's functionality mainly consists of four parts: synchronizing crates index and crates; syncing the rustup-init files; syncing the rust toolchain files; providing a HTTP server that support static file server, parse the Git protocol, and offering API services such as crate publication.
Freighter can be executed as a standalone executable program. You can build it using the cargo build --release command and then copy it to your /usr/local/bin directory
.
To sync crate files, Freighter needs to first sync the crates index. You can use the following command to sync the index file:
freighter crates pull
This command will create a crates.io-index directory in the default path /Users/${USERNAME}/freighter and fetch the index. If the index already exists, it will attempt to update it. You can also use the -c parameter to specify a working directory to change the storage location of the index and crates:
freighter -c /path/to/wokring_dir crates pull
Full download: Next, you can use the download command with the init parameter to download the full set of crates files:
freighter -c /path/to/wokring_dir crates download --init
Incremental update: Without the init parameter, Freighter will compare log records in the working directory to determine the index and crates that need incremental updates:
freighter -c /path/to/wokring_dir crates download
This project enforce the DCO.
Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.
This is my commit message
Signed-off-by: Random J Developer <random@developer.example.org>
Git even has a -s command line option to append this automatically to your commit message:
$ git commit -s -m 'This is my commit message'
Freighter is licensed under this Licensed: