# Gird Gird is a command-line tool for downloading release artifacts. Currently, it supports downloading from GitHub and GitLab releases, and there’s room to expand it to other, similar sources. ## Example: Downloading from GitHub Given an artifact name, user name, and repository name, Gird will locate the most recent release for that repository, find a release artifact with a matching file name, and download it. For example, to download the current [rqlite](https://rqlite.io/) release for linux on amd64, we can do the following: ``` $ gird linux-amd64 -e musl github rqlite rqlite ``` In that example, `linux-amd64` is telling gird that we want a release file which contains “linux-amd64” in its file name, `-e musl` is telling it that we *don’t* want the variant that has “linux-amd64-musl“ in its file name even though it would otherwise match, `github` is telling it that it should source the file from a GitHub release, the first `rqlite` is telling it to look under the GitHub user called “rqlite” and the second `rqlite` is telling it that we want that user’s repository which is also called “rqlite”. Gird will look through the current GitHub release for the specified repository, find a matching file (e.g. **rqlite-v8.23.0-linux-amd64.tar.gz**), and download it. ## It’s also a library Gird can also be added to your Cargo.toml and used programmatically in other Rust programs. Each source for downloading release artifacts has its own module within the crate, containing specialized tools for interacting with that source. ## Community Gird lives at . If you encounter a bug, would like to discuss Gird, or need help, email me at djarb@highenergymagic.org. Patches are welcome by email as well. Prepare them with **git format-patch** and send them to the same address, or point me at a repository I can pull from. ## A Note on Static Linking It can be convenient to statically link programs such as Gird which may be used in bootstrapping a working environment. Rust programs are *mostly* static by default, but on x86-64 Linux we can go fully static by adding an alias to the .cargo/config.toml file [alias] static = ["build", "--release", "--target", "x86_64-unknown-linux-gnu", "--config", "build.rustflags='-C target-feature=+crt-static'"] which will enable us to compile statically linked release binaries with a simple cargo static The same trick works, with appropriate modification of the target identifier, on other CPU architectures and on Windows MSVC targets.