Skip to content

Adding a crate

harmless-tech edited this page Aug 21, 2023 · 9 revisions

This requires knowledge of how to use git and GitHub.

  1. Clone your index. git clone URL
  2. Create a branch. git checkout -b NAME
  3. Copy the _crate.toml.tmpl file under crates and make a new file called $CRATE.toml also under crates. (You can name the toml file anything, but it must end with .toml)
  4. Fill out the info needed and delete any target flags you do not need. (See CRATES for examples)
  5. Under pr/_allowlist add the crate id. This will allow github actions to test that crate.
  6. Add - [$CRATE]($GIT_URL) to the README.
  7. Push and then open a pull request on that branch. This will run the build process.
  8. Fix any build problems then merge the pull request.
  9. The action to build the crate should now run and put it under the tag/release $CRATE-$VERSION.
  10. To download the crate with cargo-prebuilt run cargo prebuilt --index=gh-pub:github.com/$USER/$REPO $CRATE.
Clone this wiki locally