Skip to content

Add JRuby 10 support via FFI bindings#7

Closed
khasinski wants to merge 1 commit intomarcoroth:mainfrom
khasinski:jruby-support
Closed

Add JRuby 10 support via FFI bindings#7
khasinski wants to merge 1 commit intomarcoroth:mainfrom
khasinski:jruby-support

Conversation

@khasinski
Copy link
Contributor

Summary

  • Adds FFI-based bindings (lib/lipgloss/ffi_bindings.rb) that load the Go shared library directly, enabling JRuby support
  • On CRuby, nothing changes -- the existing C extension path is used as before
  • Adds go:build_shared Rake task for building .dylib/.so (vs the .a archive used by the C extension)
  • Adds ffi gem as a runtime dependency only on JRuby
  • Adds jruby-10.0 to CI matrix with conditional steps (shared lib build, skip steep/rubocop)

All 160 tests pass on both JRuby 10.0.3.0 and CRuby 4.0.

Test plan

  • CI passes for all existing CRuby versions (3.2, 3.3, 3.4, 4.0)
  • CI passes for JRuby 10.0
  • Verify go:build_shared works on Linux (CI will cover this)

JRuby cannot load C extensions, so this adds an FFI-based binding layer
that loads the Go shared library directly. On CRuby, nothing changes --
the existing C extension path is used as before.

- Add lib/lipgloss/ffi_bindings.rb with complete FFI bindings
- Conditionally load FFI bindings on JRuby in lib/lipgloss.rb
- Add go:build_shared Rake task for building .dylib/.so
- Add ffi gem dependency (JRuby only)
- Add jruby-10.0 to CI matrix
@khasinski
Copy link
Contributor Author

Talked to Marco and we decided to try a different approach, closing

@khasinski khasinski closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant