jsrun
The top-level package provides convenience functions that automatically manage a context-local Runtime instance for you.
Each asyncio task or thread gets its own isolated runtime, created lazily and cleaned up automatically.
eval_async
async
Evaluate JavaScript asynchronously using the default runtime.
bind_function
Expose a Python callable on globalThis.
bind_object
Expose a Python mapping as a JavaScript object.
get_default_runtime
get_default_runtime() -> Runtime
Return a runtime tied to the current asyncio task or thread.