{"id":28804511,"url":"https://github.com/valerio-iachini/pact_consumer_ex","last_synced_at":"2026-01-29T18:03:00.676Z","repository":{"id":290156238,"uuid":"967570208","full_name":"valerio-iachini/pact_consumer_ex","owner":"valerio-iachini","description":"Elixir NIF bindings for the Rust-based pact_consumer library, enabling contract testing via Rustler.","archived":false,"fork":false,"pushed_at":"2025-05-05T08:08:07.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T10:51:53.172Z","etag":null,"topics":["contract-testing","contracts","elixir","pact","rust","rustler"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/valerio-iachini.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}},"created_at":"2025-04-16T16:53:37.000Z","updated_at":"2025-05-05T13:34:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"b24545fb-8f4c-4be7-8657-b1b8cd7a74a4","html_url":"https://github.com/valerio-iachini/pact_consumer_ex","commit_stats":null,"previous_names":["valerio-iachini/pact_consumer_ex"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/valerio-iachini/pact_consumer_ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerio-iachini%2Fpact_consumer_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerio-iachini%2Fpact_consumer_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerio-iachini%2Fpact_consumer_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerio-iachini%2Fpact_consumer_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valerio-iachini","download_url":"https://codeload.github.com/valerio-iachini/pact_consumer_ex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerio-iachini%2Fpact_consumer_ex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260523586,"owners_count":23021968,"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":["contract-testing","contracts","elixir","pact","rust","rustler"],"created_at":"2025-06-18T09:03:58.717Z","updated_at":"2026-01-29T18:03:00.666Z","avatar_url":"https://github.com/valerio-iachini.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pact_consumer_ex\n\n`pact_consumer_ex` is an Elixir library that provides Native Implemented Function (NIF) bindings to the [`pact_consumer`](https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_consumer) Rust library. It leverages [Rustler](https://github.com/rusterlium/rustler) to expose the Rust functions while maintaining the same look and feel as the original library.\n\n## Installation\n\nAdd to your `mix.exs` dependencies:\n\n```elixir\ndef deps do\n  [\n    {:pact_consumer_ex, \"~\u003e 0.3.0\", only: [:test]}\n  ]\nend\n```\n\nThen run:\n\n```bash\nmix deps.get\n```\n\n## Usage\n\nFor example usage of the library, refer to the [`test/pact_builder_test.exs`](test/pact_builder_test.exs) file, which contains practical examples demonstrating how to utilize the exposed NIF functions.\n\n## Configuration\n\nThis library uses the same environment variables as the Rust `pact_consumer` library ([Pact test DSL for writing consumer pact tests in Rust - Pact Docs](https://docs.pact.io/implementation_guides/rust/pact_consumer)):\n\n- **Changing the output directory**:  \n  By default, the pact files will be written to `target/pacts`. To change this, set the environment variable `PACT_OUTPUT_DIR`. \n\n- **Forcing pact files to be overwritten**:  \n  Pacts are merged with existing pact files when written. To change this behaviour so that the files are always overwritten, set the environment variable `PACT_OVERWRITE` to `true`.\n\n## Pact Plugins\n\nTo use a plugin, install it with the [`pact-plugin-cli`](https://github.com/pact-foundation/pact-plugins/releases?q=pact+plugin+cli\u0026expanded=true). By default, plugins are installed under `~/.pact/plugins/`. You can change this location by setting the `PACT_PLUGIN_DIR` environment variable.\n\nSee an example plugin usage in [`test/pact_builder_test.exs`](test/pact_builder_test.exs).\n\nFor more information about plugins, refer to the [Pact plugin quick start guide](https://docs.pact.io/plugins/quick_start).\n\n## Current Status\n\nCurrently, `pact_consumer_ex` supports:\n\n- Synchronous HTTP interactions.\n- Asynchronous message interactions.\n- Integration with Pact plugins.\n\nPlanned future enhancements include:\n\n- Support for synchronous message interactions.\n\n## Contributing\n\nContributions are welcome! Please open issues or submit pull requests for any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalerio-iachini%2Fpact_consumer_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalerio-iachini%2Fpact_consumer_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalerio-iachini%2Fpact_consumer_ex/lists"}