{"id":19293531,"url":"https://github.com/reloaded-project/devops-rust-cbindgen","last_synced_at":"2026-03-02T11:02:19.557Z","repository":{"id":244899614,"uuid":"816611715","full_name":"Reloaded-Project/devops-rust-cbindgen","owner":"Reloaded-Project","description":"A GitHub Actions wrapper around running `cbindgen` to generate C/C++ bindings from Rust code.","archived":false,"fork":false,"pushed_at":"2025-12-15T10:44:03.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v1-master","last_synced_at":"2025-12-18T10:55:51.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/Reloaded-Project.png","metadata":{"files":{"readme":"README.MD","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-18T04:53:40.000Z","updated_at":"2025-12-15T10:44:01.000Z","dependencies_parsed_at":"2024-11-09T22:35:35.279Z","dependency_job_id":"d410bdfa-050a-4c4c-b48e-ccf7e2ab2905","html_url":"https://github.com/Reloaded-Project/devops-rust-cbindgen","commit_stats":null,"previous_names":["reloaded-project/devops-rust-cbindgen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Reloaded-Project/devops-rust-cbindgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2Fdevops-rust-cbindgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2Fdevops-rust-cbindgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2Fdevops-rust-cbindgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2Fdevops-rust-cbindgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reloaded-Project","download_url":"https://codeload.github.com/Reloaded-Project/devops-rust-cbindgen/tar.gz/refs/heads/v1-master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2Fdevops-rust-cbindgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29999223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T22:35:19.099Z","updated_at":"2026-03-02T11:02:14.538Z","avatar_url":"https://github.com/Reloaded-Project.png","language":null,"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Reloaded-Project/reloaded-templates-rust\" target=\"_blank\"\u003e\n    \u003cimg src=\"assets/reloaded-logo.png\" alt=\"reloaded Logo\" width=\"100\"/\u003e\n  \u003c/a\u003e\n\n  \u003ch1 align=\"center\"\u003eGenerate bindings with cbindgen\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nThis GitHub Action generates C bindings with cbindgen for a Rust project.\n\n## Inputs\n\n| Input                     | Required | Default         | Description                                                                    |\n| ------------------------- | -------- | --------------- | ------------------------------------------------------------------------------ |\n| `rust-project-path`       | No       | `.`             | Path to the Rust project                                                       |\n| `config-file`             | Yes      | `cbindgen.toml` | Configuration file for cbindgen                                                |\n| `output-header-file`      | Yes      | `bindings_c.h`  | Path to the output header file generated by cbindgen                           |\n| `upload-artifact`         | No       | `true`          | Whether to upload the generated header file as an artifact                     |\n| `github-token`            | No       |                 | A GitHub token for pushing to the repo. Example: `${{ secrets.GITHUB_TOKEN }}` |\n| `commit-updated-bindings` | No       | `false`         | Whether to commit the updated bindings                                         |\n| `use-cache`               | No       | `true`          | Whether to use Rust caching.                                                   |\n| `artifact-prefix`         | No       | `C-Bindings-`   | Prefix for the uploaded artifact (header) name                                 |\n\n## Example Usage\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - uses: Reloaded-Project/cbindgen-action@v1\n    with:\n      rust-project-path: '.'\n      config-file: 'cbindgen.toml'\n      output-header-file: 'bindings_c.h'\n      upload-artifact: 'true'\n      github-token: ${{ secrets.GITHUB_TOKEN }}\n      commit-updated-bindings: 'true'\n      use-cache: 'true'\n      artifact-prefix: 'C-Bindings-'\n```\n\n## Caching\n\nBy default, this action uses Rust caching to speed up builds. However, you\n***should disable caching on subsequent calls*** if you're running this action\nmultiple times in the same workflow.\n\nThis is because the cache will make a copy of ***everything*** after *all* the steps finish,\\\nso a single cache will contain everything you need from all runs.\n\n### Example: Multiple Calls with Cache Control\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  \n  # First call - use cache to speed up initial build\n  - name: Generate bindings for release\n    uses: Reloaded-Project/cbindgen-action@v1\n    with:\n      rust-project-path: '.'\n      config-file: 'cbindgen.toml'\n      output-header-file: 'bindings_release.h'\n      use-cache: 'true'  # Use cache for first call\n  \n  # Second call - disable cache as it's not necessary\n  - name: Generate bindings for debug\n    uses: Reloaded-Project/cbindgen-action@v1\n    with:\n      rust-project-path: '.'\n      config-file: 'cbindgen_debug.toml'\n      output-header-file: 'bindings_debug.h'\n      use-cache: 'false'  # Disable cache for second call\n```\n\n## Getting Artifacts\n\nIf the `upload-artifact` input is set to `true`, the generated header file will be uploaded as \nan artifact with the following name format:\n\n```\n\u003cartifact-prefix\u003e\u003coutput-header-file\u003e\n```\n\nFor example, if the `artifact-prefix` input is set to `C-Bindings-` (default) and the \n`output-header-file` input is set to `bindings_c.h`, the artifact name will be \n`C-Bindings-bindings_c.h`.\n\nYou can customize the prefix by setting the `artifact-prefix` input:\n\n```yaml\n- uses: Reloaded-Project/cbindgen-action@v1\n  with:\n    artifact-prefix: 'MyProject-Headers-'\n    output-header-file: 'bindings.h'\n    # This will create an artifact named: MyProject-Headers-bindings.h\n```\n\nIf you are not uploading an artifact, the generated header can be found at\n`${{ inputs.rust-project-path }}/${{ inputs.output-header-file }}`.\n\n## Purpose\n\nThis is part of the release pipeline for Reloaded3 libraries and components.\n\nTo make things more maintainable, and better for everyone, the code has been wrapped into an\nefficient GitHub Action.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freloaded-project%2Fdevops-rust-cbindgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freloaded-project%2Fdevops-rust-cbindgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freloaded-project%2Fdevops-rust-cbindgen/lists"}