Skip to content

feature

Functions:

build_assertions_runtime_feature

build_assertions_runtime_feature() -> RuntimeFeature
Source code in src/irx/builder/runtime/assertions/feature.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@typechecked
def build_assertions_runtime_feature() -> RuntimeFeature:
    """
    title: Build the assertion runtime feature specification.
    returns:
      type: RuntimeFeature
    """
    runtime_root = Path(__file__).resolve().parent
    native_root = runtime_root / "native"
    return RuntimeFeature(
        name=ASSERT_RUNTIME_FEATURE_NAME,
        symbols={
            ASSERT_FAILURE_SYMBOL_NAME: ExternalSymbolSpec(
                ASSERT_FAILURE_SYMBOL_NAME,
                _declare_assert_failure,
            ),
        },
        artifacts=(
            NativeArtifact(
                kind="c_source",
                path=native_root / "irx_assert_runtime.c",
                include_dirs=(native_root,),
                compile_flags=("-std=c99",),
            ),
        ),
    )