module Rubellite::Spinel

Overview

Integration module for Matz's Spinel ahead-of-time Ruby compiler. Compiles Ruby code into native C, built into a shared library, and called directly via pure C ABI function pointers with zero VM overhead.

Defined in:

rubellite/spinel.cr

Class Method Summary

Class Method Detail

def self.available? : Bool #

Checks if the Spinel compiler binary is available


[View source]
def self.compile_fn(ruby_code : String, name : String, args : Tuple, returns : Class) #

Compiles a Ruby function with Spinel (or native C generator) into a loadable shared library


[View source]
def self.generate_c_wrapper(ruby_code : String, func_name : String, c_arg_types : Array(String), c_ret_type : String) : String #

Emits an optimized C wrapper for the given Ruby routine when Spinel compiler is invoked or simulated for AOT fast-path.


[View source]