27 ms·
C ext support shipped in an "experimental" form in JRuby 1.6. The main problem is that C extensions suck in so many ways: * Can't have multiple VMs in process,
by headius 15y ago
C ext support shipped in an "experimental" form in JRuby 1.6. The main problem is that C extensions suck in so many ways:
* Can't have multiple VMs in process, because C exts load all their state into C globals
* Can't run them concurrently, because they can't be trusted not to segfault
* Don't participate well in modern GCs, so they have significantly higher call overhead in JRuby or Rubinius than they do in MRI
FFI is a better option in almost every case, although it is admittedly a much trickier path to cross-platform library binding. The best thing the Ruby community could do to move Ruby forward is to either come up with a better C API or start using FFI for everything. C exts suck.