module
Rubellite::Spinel::Transpiler
Overview
Lightweight Ahead-Of-Time C99 transpiler for Ruby compute kernels. Translates a typed, performance-focused subset of Ruby (loops, branches, scalar math, and array buffer lookups) into high-performance C.
Defined in:
rubellite/spinel/transpiler.crClass Method Summary
-
.c_code?(source : String) : Bool
Checks if the provided code is already native C code.
-
.transpile(source : String, func_name : String, param_names : Array(String), param_c_types : Array(String), ret_c_type : String) : String
Transpiles Ruby source or formats C code into an exported C99 compilation unit.
-
.wrap_raw_c(source : String, primary_func : String) : String
Wraps raw C source code with necessary headers and export macros
Class Method Detail
Checks if the provided code is already native C code.
def self.transpile(source : String, func_name : String, param_names : Array(String), param_c_types : Array(String), ret_c_type : String) : String
#
Transpiles Ruby source or formats C code into an exported C99 compilation unit.
Wraps raw C source code with necessary headers and export macros