{"id":23450788,"url":"https://github.com/red-data-tools/extpp","last_synced_at":"2026-02-23T04:01:38.385Z","repository":{"id":56520078,"uuid":"93065768","full_name":"red-data-tools/extpp","owner":"red-data-tools","description":"C++ Ruby extension API","archived":false,"fork":false,"pushed_at":"2026-02-18T03:37:27.000Z","size":137,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-18T07:56:38.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/red-data-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-01T14:26:01.000Z","updated_at":"2026-02-18T03:37:31.000Z","dependencies_parsed_at":"2022-08-15T20:20:11.114Z","dependency_job_id":null,"html_url":"https://github.com/red-data-tools/extpp","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/red-data-tools/extpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red-data-tools%2Fextpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red-data-tools%2Fextpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red-data-tools%2Fextpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red-data-tools%2Fextpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/red-data-tools","download_url":"https://codeload.github.com/red-data-tools/extpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/red-data-tools%2Fextpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29699340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-12-24T00:15:09.209Z","updated_at":"2026-02-23T04:01:38.349Z","avatar_url":"https://github.com/red-data-tools.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n## Name\n\nExt++\n\n## Description\n\nExt++ is a Ruby extension that provides C++ API for writing Ruby extension.\n\nYou can write your Ruby extension easier than Ruby's C API. Because\nExt++'s C++ API reduces duplicated code needed for Ruby's C API.\n\nYou can use all Ruby's C API without any adapter layer. Because you\ncan use C API directory from C++.\n\n## Install\n\n```console\n% gem install extpp\n```\n\n## How to use\n\nHere is an example to create `Hello` class.\n\nCreate `hello.cpp`:\n\n```c++\n#include \u003cruby.hpp\u003e\n\nRB_BEGIN_DECLS\n\nvoid\nInit_hello(void)\n{\n  rb::Class klass(\"Hello\");\n  klass.define_method(\"initialize\", [](VALUE rb_self, int argc, VALUE *argv) {\n      VALUE rb_name;\n      rb_scan_args(argc, argv, \"1\", \u0026rb_name);\n      rb::Object self(rb_self);\n      self.ivar_set(\"@name\", rb_name);\n      return Qnil;\n    });\n  klass.define_method(\"greet\", [](VALUE rb_self) {\n      rb::Object self(rb_self);\n      rb::Object prefix(rb_str_new_cstr(\"Hello \"));\n      auto message = prefix.send(\"+\", {self.ivar_get(\"@name\")});\n      return static_cast\u003cVALUE\u003e(message);\n    });\n}\n\nRB_END_DECLS\n```\n\nThis code equals to the following Ruby code:\n\n```ruby\nclass Hello\n  def initialize(name)\n    @name = name\n  end\n\n  def greet\n    \"Hello \" + @name\n  end\nend\n```\n\nCreate `extconf.rb`:\n\n```ruby\nrequire \"extpp\"\n\ncreate_makefile(\"hello\")\n```\n\nCreate `Makefile`:\n\n```console\n% ruby extconf.rb\n```\n\nBuild this extension:\n\n```console\n% make\n```\n\nNow, you can use this extension:\n\n```console\n% ruby -r ./hello -e 'p Hello.new(\"me\").greet'\n\"Hello me\"\n```\n\n## License\n\nCopyright (C) 2017-2021 Sutou Kouhei\n\nThe 2-Clause BSD License. See [LICENSE.txt](LICENSE.txt) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred-data-tools%2Fextpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fred-data-tools%2Fextpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred-data-tools%2Fextpp/lists"}