Skip to content

Commit 2c222a6

Browse files
committed
Update prior art.
1 parent f5edb54 commit 2c222a6

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Wrapping C and C++ libraries by hand is a long, arduous task. For large, complex
77
As an example, there used to be hand-crafted Ruby [bindings](https://github.com/ruby-opencv/ruby-opencv) for [OpenCV](https://opencv.org/). However, they were based on the C API which was subsequently remove by the OpenCV project. `ruby-bindgen` was used to create new [bindings](https://github.com/cfis/opencv-ruby) based on the new C++ API. The bindings wrap over [1,000](https://cfis.github.io/opencv-ruby/) C++ classes and almost [10,000](https://cfis.github.io/opencv-ruby/) method calls. Imagine having to do that by hand!
88

99
## Ecosystem
10-
`ruby-bindgen` is one part of the C/C++ to Ruby toolchain.
10+
`ruby-bindgen` is part of the C/C++ to Ruby toolchain.
1111

1212
```mermaid
1313
flowchart TD

docs/prior_art.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,46 @@
22

33
This page lists related projects and adjacent tools that influenced, overlap with, or can complement `ruby-bindgen`.
44

5-
## Related Ruby Binding Generators
5+
## C/C++
66

7-
### ffi_gen
7+
### SWIG
88

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.
1212

13-
### rbind
13+
## C
1414

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
1816

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).
2020

21-
### Rice
21+
## C++
2222

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
2624

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
2828

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
3230

3331
### Magnus
3432

35-
- Project: https://github.com/matsadler/magnus
33+
- Project: [magnus](https://github.com/matsadler/magnus)
3634
- Scope: Rust crate for Ruby bindings
3735
- Notes: Not a direct Ruby generator alternative for C/C++, but useful as a design reference for Ruby-native APIs from another language.
3836

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.
4042

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

Comments
 (0)