Road to Go gem
summary
Library called Go gem wrapper generates native Ruby extensions by auto-producing roughly 1,100 bindings from CRuby headers into Go, using RubyHeaderParser and RubyHeaderToGo to emit versioned Go sources per Ruby minor release (currently supports Ruby 3.3 and 3.4). It patches Bundler with a createGoMakefile, handles C/Go pointer and string safety by explicit free to avoid segv, benchmarks show goroutines ≈30x faster than Ruby threads, but needs glibc and Windows is untested.
AI-written summary · about
chapters (22)
- 0:00Introduction and speaker intro
- 1:13What is Go gem wrapper
- 4:04Creating Go gem with patches
- 5:08Implementing Ruby methods in Go
- 6:09Go gem wrapper architecture
- 8:30Compatibility challenges C and Go
- 10:36Automating bindings with tools
- 13:17Parsing Ruby header files
- 14:37Handling C types in Go
- 17:17Pointer handling in bindings
- 18:57Managing Ruby version differences
- 19:37Go build constraints explained
- 20:57Package-go-dev support issues
- 21:57Solving build tag problems
- 22:37Transferring Ruby references to Go
- 23:37Testing Go native extensions
- 24:57Go linter integration
- 25:37Patching Bundler for Go gem
- 26:37Go gem advantages goroutines
- 27:57Disadvantages of Go gem
- 29:17Go gem limitations and issues
- 29:57Example gem HTTP parallel requests








