Skip to content

feature

Declares the narrow append/index runtime surface for IRX lists. The current ABI intentionally does not expose a destroy/release helper yet, so produced list storage remains process-lifetime for now.

Functions:

build_list_runtime_feature

build_list_runtime_feature() -> RuntimeFeature
Source code in src/irx/builder/runtime/list/feature.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@typechecked
def build_list_runtime_feature() -> RuntimeFeature:
    """
    title: Build the dynamic-list runtime feature specification.
    returns:
      type: RuntimeFeature
    """
    native_root = Path(__file__).resolve().parent / "native"
    return RuntimeFeature(
        name="list",
        symbols={
            LIST_APPEND_SYMBOL: ExternalSymbolSpec(
                LIST_APPEND_SYMBOL,
                _declare_list_append,
            ),
            LIST_AT_SYMBOL: ExternalSymbolSpec(
                LIST_AT_SYMBOL,
                _declare_list_at,
            ),
        },
        artifacts=(
            NativeArtifact(
                kind="c_source",
                path=native_root / "irx_list_runtime.c",
                include_dirs=(native_root,),
                compile_flags=("-std=c99",),
            ),
        ),
        metadata={
            "canonical_name": "list",
            "symbols": (LIST_APPEND_SYMBOL, LIST_AT_SYMBOL),
            "limitations": (
                "append/index only",
                "no destroy or release helper yet",
            ),
        },
    )