{"id":29776864,"url":"https://github.com/godaddy/cobhan-ruby","last_synced_at":"2025-10-15T02:25:27.351Z","repository":{"id":43095654,"uuid":"463704831","full_name":"godaddy/cobhan-ruby","owner":"godaddy","description":"Ruby wrapper library for the Cobhan FFI system","archived":false,"fork":false,"pushed_at":"2024-05-20T08:30:33.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-10-09T06:30:51.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/godaddy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-25T23:36:55.000Z","updated_at":"2024-05-20T08:27:32.000Z","dependencies_parsed_at":"2024-05-20T09:44:03.645Z","dependency_job_id":null,"html_url":"https://github.com/godaddy/cobhan-ruby","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.04255319148936165,"last_synced_commit":"1c4543c0e7f4dd1eccb8037a9d63e46628c5d152"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/godaddy/cobhan-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godaddy%2Fcobhan-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godaddy%2Fcobhan-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godaddy%2Fcobhan-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godaddy%2Fcobhan-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godaddy","download_url":"https://codeload.github.com/godaddy/cobhan-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godaddy%2Fcobhan-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005549,"owners_count":26083918,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-07-27T10:20:46.108Z","updated_at":"2025-10-15T02:25:27.325Z","avatar_url":"https://github.com/godaddy.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cobhan\n\nCobhan FFI is a proof of concept system for enabling shared code to be written in Rust or Go and consumed from all major languages/platforms in a safe and effective way, using easy helper functions to manage any unsafe data marshaling.\n\n## Types\n\n* Supported types\n  * int32 - 32bit signed integer\n  * int64 - 64bit signed integer\n  * float64 - double precision 64bit IEEE 754 floating point\n  * Cobhan buffer - length delimited 8bit buffer (no null delimiters)\n      * utf-8 encoded string\n      * JSON\n      * binary data\n* Cobhan buffer details\n  * Callers provide the output buffer allocation and capacity\n  * Called functions can transparently return larger values via temporary files\n  * **Modern [tmpfs](https://en.wikipedia.org/wiki/Tmpfs) is entirely memory backed**\n* Return values\n  * Functions that return scalar values can return the value directly\n    * Functions *can* use special case and return maximum positive or maximum negative or zero values to represent error or overflow conditions\n    * Functions *can* allow scalar values to wrap\n    * Functions should document their overflow / underflow behavior\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'cobhan'\n```\n\nAnd then execute:\n\n```bash\nbundle install\n```\n\nOr install it yourself as:\n\n```bash\ngem install cobhan\n```\n\n## Usage\n\nBy running the demo, it will automatically build the sample [libcobhandemo](spec/support/libcobhandemo/libcobhandemo.go) binary.\n\n```bash\nbundle exec ruby demo/demo.rb\n```\n\nOnce the binary is built, to rebuilt it, you'll have to cleanup the `tmp` dir.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n### Running specs\n\n```bash\nbundle exec rspec spec\n```\n\n### Running specs inside vagrant\n\n```bash\nvagrant up\nvagrant ssh\ncd /vagrant/\nbundle install\nbundle exec rspec spec\n\n# Or to run specs on arm64 inside vagrant:\ncd /vagrant/\nspec/support/libcobhandemo/arm64_build_and_test.sh\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/godaddy/cobhan-ruby.\n\n## Releasing new gem version\n\n```\n# Create and push a version tag\ngit tag -a v$(rake version) -m \"Version $(rake version)\"\ngit push origin v$(rake version)\n\n# Create a release in Github to trigger .github/workflows/publish.yml workflow\necho \"Version $(rake version)\"\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodaddy%2Fcobhan-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodaddy%2Fcobhan-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodaddy%2Fcobhan-ruby/lists"}