class
Medusa::Runtime
- Medusa::Runtime
- Reference
- Object
Defined in:
medusa/runtime.crConstructors
Instance Method Summary
- #can_block=(val : Bool) : Nil
-
#drain_jobs : Int32
Drains all pending jobs.
-
#execute_pending_job : Tuple(Bool, QuickJS::JSContext)
Executes one pending job.
- #finalize : Nil
- #freed? : Bool
- #gc_threshold=(threshold : UInt64) : Nil
- #info=(info : String) : Nil
- #job_pending? : Bool
- #live_object?(obj : QuickJS::JSValue) : Bool
- #mark_freed! : Nil
- #max_stack_size=(size : UInt64) : Nil
- #memory_limit=(limit : UInt64) : Nil
- #memory_usage : QuickJS::JSMemoryUsage
- #opaque : Pointer(Void)
- #opaque=(ptr : Pointer(Void)) : Nil
- #run_gc : Nil
-
#setup_module_loader : Nil
Enables file-based ES module loading.
- #strip_info : Int32
- #strip_info=(flags : QuickJS::StripFlag) : Nil
- #to_unsafe : QuickJS::JSRuntime
- #update_stack_top : Nil
Constructor Detail
Instance Method Detail
def execute_pending_job : Tuple(Bool, QuickJS::JSContext)
#
Executes one pending job. Returns {success, context} where success is true if a job was executed, false if none pending. Raises on JS exception during job execution (returns < 0).
def setup_module_loader : Nil
#
Enables file-based ES module loading. After calling this, all contexts
on this runtime can use import / export with file paths.
Relative paths are resolved from the importing module's directory.
This runs entirely in C — no Crystal closures cross the FFI boundary.