{"id":19016179,"url":"https://github.com/fosskers/cargo-aur","last_synced_at":"2025-04-06T16:11:22.135Z","repository":{"id":41967853,"uuid":"271374296","full_name":"fosskers/cargo-aur","owner":"fosskers","description":"Prepare Rust projects to be released on the Arch Linux User Repository.","archived":false,"fork":false,"pushed_at":"2024-08-19T23:47:31.000Z","size":116,"stargazers_count":90,"open_issues_count":7,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T15:07:48.456Z","etag":null,"topics":["archlinux","aur","cargo","cargo-plugin","cargo-subcommand","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fosskers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-10T20:07:04.000Z","updated_at":"2025-03-15T16:50:22.000Z","dependencies_parsed_at":"2023-11-27T07:37:41.878Z","dependency_job_id":"868e542f-8116-45df-a675-fa35c75d7c68","html_url":"https://github.com/fosskers/cargo-aur","commit_stats":{"total_commits":65,"total_committers":4,"mean_commits":16.25,"dds":"0.10769230769230764","last_synced_commit":"c2661279b701f061056defca6902d184eeafc3e6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosskers%2Fcargo-aur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosskers%2Fcargo-aur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosskers%2Fcargo-aur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosskers%2Fcargo-aur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fosskers","download_url":"https://codeload.github.com/fosskers/cargo-aur/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archlinux","aur","cargo","cargo-plugin","cargo-subcommand","rust"],"created_at":"2024-11-08T19:41:33.690Z","updated_at":"2025-04-06T16:11:22.104Z","avatar_url":"https://github.com/fosskers.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cargo-aur\n\n[![Build](https://github.com/fosskers/cargo-aur/workflows/Build/badge.svg)][3]\n[![](https://img.shields.io/crates/v/cargo-aur.svg)][4]\n![AUR version][5]\n\n`cargo-aur` is a new subcommand for `cargo` that produces a release tarball and\nPKGBUILD file for a Rust project, so that it can be released on the Arch Linux\nUser Repository (AUR).\n\nNo extra configuration is necessary. As long as your `Cargo.toml` has [the usual\nfields][0], a PKGBUILD will be generated with all the necessary sections filled\nout.\n\n## Installation\n\nGuess what? `cargo-aur` itself is on the AUR! Install it with an AUR-compatible\npackage manager like [`aura`][1]:\n\n```\nsudo aura -A cargo-aur-bin\n```\n\n...or via `cargo`:\n\n```\ncargo install cargo-aur\n```\n\n## Usage\n\n### Basics\n\nNavigate to a Rust project, and run:\n\n```\ncargo aur\n```\n\nThis will produce a `foobar-1.2.3-x86_64.tar.gz` tarball and a PKGBUILD within\n`target/cargo-aur`.\n\nIf you wish, you can now run `makepkg` to ensure that your package actually builds.\n\n```\n\u003e makepkg\n==\u003e Making package: cargo-aur-bin 1.0.0-1 (Wed 10 Jun 2020 08:23:46 PM PDT)\n==\u003e Checking runtime dependencies...\n==\u003e Checking buildtime dependencies...\n... etc ...\n==\u003e Finished making: cargo-aur-bin 1.0.0-1 (Wed 10 Jun 2020 08:23:47 PM PDT)\n```\n\nNotice that the built package itself is postfixed with `-bin`, which follows the\nAUR standard.\n\nAt this point, it is up to you to:\n\n1. Create an official `Release` on Github/Gitlab, attaching the original binary\n   tarball that `cargo aur` produced.\n2. Copy the PKGBUILD to a git repo that tracks releases of your package.\n3. Run `makepkg --printsrcinfo \u003e .SRCINFO`.\n4. Commit both files and push to the AUR.\n\nSome of these steps may be automated in `cargo aur` at a later date if there is\nsufficient demand.\n\n### Custom Binary Names\n\nIf you specify a `[[bin]]` section in your `Cargo.toml` and set the `name`\nfield, this will be used as the binary name to install within the PKGBUILD.\n\n### `depends` and `optdepends`\n\nIf your package requires other Arch packages at runtime, you can specify these\nwithin your `Cargo.toml` like this:\n\n```toml\n[package.metadata.aur]\ndepends = [\"nachos\", \"pizza\"]\noptdepends = [\"sushi\", \"ramen\"]\n```\n\nAnd these settings will be copied to your PKGBUILD.\n\n### Including Additional Files\n\nThe `files` list can be used to designated initial files to be copied the user's\nfilesystem. So this:\n\n```toml\n[package.metadata.aur]\nfiles = [[\"path/to/local/foo.txt\", \"/usr/local/share/your-app/foo.txt\"]]\n```\n\nwill result in this:\n\n```toml\npackage() {\n    install -Dm755 your-app -t \"$pkgdir/usr/bin\"\n    install -Dm644 LICENSE \"$pkgdir/usr/share/licenses/$pkgname/LICENSE\"\n    install -Dm644 \"path/to/local/foo.txt\" \"$pkgdir/usr/local/share/your-app/foo.txt\"\n}\n```\n\n### Custom commands within `package()`\n\nThe `custom` list can be used to add specific commands to the `package()`\nfunction. This config:\n\n```toml\n[package.metadata.aur]\ncustom = [\"echo hi\"]\n```\n\nyields:\n\n```\npackage() {\n    install -Dm755 cargo-aur -t \"$pkgdir/usr/bin\"\n    install -Dm644 LICENSE \"$pkgdir/usr/share/licenses/$pkgname/LICENSE\"\n    echo hi\n}\n```\n\n**Note:** Caveat emptor. No attempt is made to verify the injected commands.\n\n### Static Binaries\n\nRun with `--musl` to produce a release binary that is statically linked via\n[MUSL][2].\n\n```\n\u003e cargo aur --musl\n\u003e cd target/x86_64-unknown-linux-musl/release/\n\u003e ldd \u003cyour-binary\u003e\n    not a dynamic executable\n```\n\n[0]: https://rust-lang.github.io/api-guidelines/documentation.html#c-metadata \n[1]: https://github.com/fosskers/aura\n[2]: https://musl.libc.org/\n[3]: https://github.com/fosskers/cargo-aur/actions\n[4]: https://crates.io/crates/cargo-aur\n[5]: https://img.shields.io/aur/version/cargo-aur-bin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffosskers%2Fcargo-aur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffosskers%2Fcargo-aur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffosskers%2Fcargo-aur/lists"}