|
2 | 2 |
|
3 | 3 | This page lists related projects and adjacent tools that influenced, overlap with, or can complement `ruby-bindgen`. |
4 | 4 |
|
5 | | -## Related Ruby Binding Generators |
| 5 | +## C/C++ |
6 | 6 |
|
7 | | -### ffi_gen |
| 7 | +### SWIG |
8 | 8 |
|
9 | | -- Project: https://github.com/ffi/ffi_gen |
10 | | -- Scope: Generate Ruby FFI wrappers for C APIs |
11 | | -- Notes: Historical reference point for C-oriented generation in the Ruby ecosystem. |
| 9 | +- Project: [SWIG](https://www.swig.org/) |
| 10 | +- Scope: Multi-language binding generator for C and C++ |
| 11 | +- Notes: Generates bindings for many languages including Ruby, Python, Java, and Go. Uses its own interface definition files rather than parsing headers directly. The most established tool in this space — active since 1996. |
12 | 12 |
|
13 | | -### rbind |
| 13 | +## C |
14 | 14 |
|
15 | | -- Project: https://github.com/D-Alex/rbind |
16 | | -- Scope: C++ binding generator with a custom parser approach |
17 | | -- Notes: Relevant comparison for C++ wrapping goals and parser tradeoffs. |
| 15 | +### ffi_gen |
18 | 16 |
|
19 | | -## Adjacent Ecosystem Tools |
| 17 | +- Project: [ffi_gen](https://github.com/ffi/ffi_gen) |
| 18 | +- Scope: Generate Ruby FFI wrappers for C APIs |
| 19 | +- Notes: Has not been updated in over a decade and includes liblang findings versus using [ffi-clang](https://github.com/ioquatix/ffi-clang). |
20 | 20 |
|
21 | | -### Rice |
| 21 | +## C++ |
22 | 22 |
|
23 | | -- Project: https://github.com/ruby-rice/rice |
24 | | -- Scope: C++ library for implementing Ruby native extensions |
25 | | -- Relationship to `ruby-bindgen`: `ruby-bindgen` can generate Rice-oriented C++ wrapper code. |
| 23 | +### rbind |
26 | 24 |
|
27 | | -### ffi-clang |
| 25 | +- Project: [rbind](https://github.com/D-Alex/rbind) |
| 26 | +- Scope: C++ binding generator with a custom parser approach |
| 27 | +- Notes: Has not been updated in four years and is coupled to OpenCV |
28 | 28 |
|
29 | | -- Project: https://github.com/ioquatix/ffi-clang |
30 | | -- Scope: Ruby FFI bindings to libclang |
31 | | -- Relationship to `ruby-bindgen`: provides AST access used for parsing headers. |
| 29 | +## Rust |
32 | 30 |
|
33 | 31 | ### Magnus |
34 | 32 |
|
35 | | -- Project: https://github.com/matsadler/magnus |
| 33 | +- Project: [magnus](https://github.com/matsadler/magnus) |
36 | 34 | - Scope: Rust crate for Ruby bindings |
37 | 35 | - Notes: Not a direct Ruby generator alternative for C/C++, but useful as a design reference for Ruby-native APIs from another language. |
38 | 36 |
|
39 | | -## Positioning Summary |
| 37 | +### rb-sys |
| 38 | + |
| 39 | +- Project: [rb-sys](https://github.com/oxidize-rb/rb-sys) |
| 40 | +- Scope: Rust bindings for the Ruby C API |
| 41 | +- Notes: Provides low-level Rust bindings to Ruby, auto-generated from `ruby.h` using rust-bindgen. |
40 | 42 |
|
41 | | -- `ruby-bindgen` focuses on generation from C/C++ headers with multiple output formats (`Rice`, `FFI`, `CMake`). |
42 | | -- Compared with older generator projects, it emphasizes modern C++ edge cases and large-library workflows. |
43 | | -- In practice, tools in this list can be alternatives for some use cases, or dependencies/complements in a broader pipeline. |
| 43 | +### Rutie |
| 44 | + |
| 45 | +- Project: [rutie](https://github.com/danielpclark/rutie) |
| 46 | +- Scope: Rust crate for Ruby bindings |
| 47 | +- Notes: An alternative to Magnus for writing Ruby extensions in Rust. |
0 commit comments