{"id":33936465,"url":"https://github.com/stepfunc/oo_bindgen","last_synced_at":"2026-04-06T06:04:26.595Z","repository":{"id":37898520,"uuid":"261881295","full_name":"stepfunc/oo_bindgen","owner":"stepfunc","description":"DSL and code generator for mapping C APIs to object oriented languages","archived":false,"fork":false,"pushed_at":"2025-05-05T19:58:31.000Z","size":860,"stargazers_count":19,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-02T11:11:32.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stepfunc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-05-06T21:21:16.000Z","updated_at":"2025-05-05T17:56:16.000Z","dependencies_parsed_at":"2024-05-20T19:52:54.826Z","dependency_job_id":"ae45e874-1223-4ab3-96c6-ce3e9a246899","html_url":"https://github.com/stepfunc/oo_bindgen","commit_stats":{"total_commits":172,"total_committers":2,"mean_commits":86.0,"dds":"0.38372093023255816","last_synced_commit":"f681144b8909f02cdd421717b6b4a0bad7dc7968"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/stepfunc/oo_bindgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepfunc%2Foo_bindgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepfunc%2Foo_bindgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepfunc%2Foo_bindgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepfunc%2Foo_bindgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stepfunc","download_url":"https://codeload.github.com/stepfunc/oo_bindgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepfunc%2Foo_bindgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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-12-12T14:16:57.200Z","updated_at":"2026-04-06T06:04:26.590Z","avatar_url":"https://github.com/stepfunc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Step Function I/O](./sfio_logo.png)\n\n# oo-bindgen\n\n![CI](https://github.com/stepfunc/oo_bindgen/workflows/CI/badge.svg)\n\nObject-oriented binding generator for Rust.\n\n\n## License\nLicensed under the terms of the MIT or Apache v2 licenses at your choice.\n\n## Workflow\n\n- First, you write your Rust library without thinking about bindings.\n- Then, you write a C FFI to your Rust library, taking into account how object-\n  oriented languages will interact with it. You also make sure to protect as\n  much as possible the interface between your Rust library and the outside C\n  world\n- You define a general object-oriented \"schema\" that uses the C FFI to interact\n  with your library.\n- You generate the bindings in the target languages using generators that reads\n  the previously defined \"schema\" and generate easy-to-use, idiomatic and\n  portable code.\n- You write unit tests in the generated languages to make sure everything works\n  as expected.\n\n## Directories\n\n- `oo-bindgen`: main library to build an object-oriented representation of your\n  library.\n- `tests`: contains an example `foo-ffi` library with the associated\n  `foo-bindings` object-oriented library definition. It builds the same library\n  in each supported language. Each language has extensive unit tests written to\n  check that the generated bindings work as expected.\n\n### C bindings\n\nA minimal `CMakeLists.txt` to compile with a library generated by oo-bindgen is\nthe following:\n\n```cmake\ncmake_minimum_required(VERSION 3.8)\n\nproject(my_awesome_project LANGUAGES C)\n\n# Find the foo library generated by oo-bindgen\nset(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_LIST_DIR}/foo/cmake)\nfind_package(foo REQUIRED)\n\n# Add your awesome project with a dependency to foo\nadd_executable(my_awesome_project main.c)\ntarget_link_libraries(my_awesome_project PRIVATE foo)\n\n# Copy the DLL/.so after build\nadd_custom_command(TARGET my_awesome_project POST_BUILD \n    COMMAND ${CMAKE_COMMAND} -E copy_if_different $\u003cTARGET_FILE:foo\u003e $\u003cTARGET_FILE_DIR:my_awesome_project\u003e\n)\n```\n\n### .NET bindings\n\n- Create a new [local NuGet feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds).\n  To do this, create an empty directory somewhere then run `nuget sources add -Name my-nuget-feed -Source /my-nuget-feed`.\n- Add the generated NuGet package to it using `nuget add foo.0.1.0.nupkg -Source /my-nuget-feed`.\n- In your project, add a dependency to the package. You can do `dotnet add\n  MyAwesomeProject package foo` or add it using Visual Studio interface. It\n  should add a line in your `.csproj` like the following: `\u003cPackageReference Include=\"foo\" Version=\"0.1.0\" /\u003e`\n\n### Java bindings\n\n- Install the JAR to your local Maven repository with\n  `mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -D\"file=foo-0.1.0.jar\"`\n- Add the dependency in your project with\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.stepfunc\u003c/groupId\u003e\n    \u003cartifactId\u003efoo\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepfunc%2Foo_bindgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstepfunc%2Foo_bindgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepfunc%2Foo_bindgen/lists"}