Skip to content

Non-C extension support #193

@headius

Description

@headius

I would like to be able to support this library in JRuby, but the C extension is a limiting factor. JRuby does not support the CRuby extension API.

We do, however, support some alternative mechanisms for binding native libraries:

  • Ruby FFI: this would require some manual work to write the FFI binding, but since you have a standalone C library it might make the most sense. See sassc for an example library that ships a standalone dynamic library with an FFI binding.
  • Java Native Runtime (JNR) FFI: This is our current Java/C-based FFI backend, and upon this we build Ruby FFI and several other features in JRuby. Supporting JNR would make this library accessible to the entire JVM community, including JRuby.
  • Java Foreign Function and Memory API: This is a new API in recent versions of Java designed to integrate with the JVM memory model and JIT (for better performance). It also supports a code generator called "jextract" that can generate the entire API binding from a header file.

Some combination of these APIs should get us there!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions