class
Rubellite::Spinel::Kernel
- Rubellite::Spinel::Kernel
- Reference
- Object
Overview
Multi-function native C kernel container
Defined in:
rubellite/spinel.crConstructors
Instance Method Summary
-
#async(return_type : T.class, func_name : String, *args) : Future(T) forall T
Asynchronously executes the C kernel function on a background fiber without blocking the caller
-
#call(func_name : String, *args) : Int64
Calls an exported symbol dynamically, defaulting to Int64 return
-
#call_as(return_type : T.class, func_name : String, *args) : T forall T
Calls an exported symbol with explicit return type
-
#call_with_callback(func_name : String, *args, &block : Int64, Int64 -> Nil) : Nil
Calls a C function passing a Crystal callback closure and its context
- #close
-
#disassemble(func_name : String | Nil = nil) : String
Radare2 machine code disassembly inspection
-
#export_to_ruby(ruby_class_or_mod : String, ruby_method_name : String, c_func_name : String, param_types : Array(String) = [] of String, return_type : String = "Int64") : Nil
Exports a function from this kernel directly into embedded CRuby as a singleton method
-
#function(func_name : String, return_type : String = "Int64") : NativeFunction
Returns a callable NativeFunction handle for a specific exported symbol
- #handle : Pointer(Void)
- #lib_path : String
- #name : String
-
#pipe(input_channel : Channel(U), output_type : V.class, func_name : String, *args, capacity : Int32 = 64) : Channel(V) forall U, V
Connects an input channel to a C processing kernel that streams to an output channel
- #source_code : String
-
#stream(item_type : T.class, func_name : String, *args, capacity : Int32 = 64) : Channel(T) forall T
Streams real-time data from a C kernel into a Crystal Channel(T)
Constructor Detail
Instance Method Detail
Asynchronously executes the C kernel function on a background fiber without blocking the caller
Calls an exported symbol dynamically, defaulting to Int64 return
Calls an exported symbol with explicit return type
Calls a C function passing a Crystal callback closure and its context
Radare2 machine code disassembly inspection
Exports a function from this kernel directly into embedded CRuby as a singleton method
Returns a callable NativeFunction handle for a specific exported symbol
Connects an input channel to a C processing kernel that streams to an output channel