Why do trufflerubs need C extensions?

The current state trufflerubysays :

TruffleRuby is growing fast, but at the moment it is probably not ready to launch your full Ruby application. Support for critical C extensions such as OpenSSL and Nokogiri is missing.

Why do we trufflerubyneed C extensions? It is built on GraalVM, which is built on top of the JVM, it is actually a JRuby fork :

TruffleRuby is a JRuby fork that combines it with code from a Rubinius project, and also contains code from a standard Ruby implementation, MRI.

Could they use JRuby gems, not depending on their C options?

EDIT link to the problem on github

+4
source share
2 answers

Executing C extensions is difficult because the C extension of the API is just the inside of the MRI displayed as a header file. You do not program against a pure API - you program against all implementation details and internal MRI design decisions.

JRuby Java extensions have exactly the same problem! The JRuby Java Extension APIs are just the inside of JRuby, and you are not programming against the APIs; instead, you are programming against all the details of JRuby implementations and design decisions.

- C Java , , , JRuby, .

, C , . Java, Java, .

https://youtu.be/YLtjkP9bD_U?t=1562

+11

, :

C-?

. , , , .

+3

Source: https://habr.com/ru/post/1667431/


All Articles