arxjit.core
arxjit.core
Source: packages/arxjit/src/arxjit/core.py
title: The @jit decorator, the public entry point of arxjit.
summary: >-
Wraps a pure Python function so it can be compiled through the Arx stack. In
this first version the wrapper records the requested signature and falls back
to running the original Python function; real compilation lands in later
sprints.Functions
jit(fn: PyFunc | None=None, *, signature: Signature | None=None, cache: bool=False) -> JitFunction | functools.partial[JitFunction]
title: Compile a pure Python function through the Arx stack.
summary: >-
Usable bare as ``@jit`` or with options as ``@jit(signature=i64(i64,
i64), cache=True)``. Records the requested signature and returns a
callable wrapper. When called with options it returns a partial that
wraps the function next.
parameters:
fn:
type: PyFunc | None
description: The function to wrap, when used as a bare decorator.
signature:
type: Signature | None
description: The explicit call signature.
cache:
type: bool
description: Whether to cache compiled artifacts.
returns:
type: JitFunction | functools.partial[JitFunction]Classes
JitFunction
title: A callable wrapper around a @jit-decorated function.
attributes:
py_func:
description: The original, undecorated Python function.
signature:
description: The explicit signature, or None when not given.
cache:
description: Whether compiled artifacts should be cached.