Runtime Dependency: this release requires rune-python-runtime v2.0.0, which is available on PyPI. The generated
pyproject.tomldeclaresrune.runtime>=2.0.0,<3.0.0.
Rune functions are now generated as Python callables. (Issues #108, #144, #156, #157)
- Comprehensive support: stepwise object construction (
ObjectBuilder), enum-based dispatch (match), and pre/post conditions are all generated. - Native "hand-crafted" functions: functions annotated
[codeImplementation]or with an empty body are bridged to custom Python implementations viarune_execute_native. (Issues #147, #158) See NATIVE_FUNCTIONS_INTEGRATION.md for integration details. - Side-effect-free pass-by-value inputs: function parameters are wrapped in a COW (copy-on-write) proxy at call time, ensuring the caller's objects are never mutated by function execution. (Issue #169)
- Enum-based dispatch: functions overloaded by enum value are generated as isolated per-case helpers. (Issue #165)
All standard Rune expressions are now generated. (Issues #7, #168)
- Missing collection and list operators: added support for use of
sort,min,max,reduce,distinct,flatten,reverse,sum,one-of, when operating across a list. All other remaining operators are fully generated. - Implicit closure parameters:
extract,filter, andreducewith no named parameter fall back to the implicititemvariable (ora/bforreduce). - Closure-based keys:
sort,min, andmaxwith a closure block (e.g.,sort [ item -> price -> amount ]) are translated tokey=lambdasyntax. - Null / "nothing" propagation: all collection operators filter
Nonevalues and short-circuit toNonewhen the input collection is absent, consistent with the Rune specification. - List comparison null semantics:
nullvalues are correctly handled in list comparisons, including pairwise<>semantics. with-meta: inlinewith-metaexpressions are translated to type-aware Python —*WithMetaconstructors for basic types,EnumWithMetaMixin.deserialize()for enum types, andset_meta()for complex types.as-key: single and multi-cardinalityas-keyoperations are translated toReference(x)and list comprehensions.
For the full coverage matrix see RUNE_LANGUAGE_GAPS.md.
Mutually recursive types (circular inheritance and attribute references) are now fully handled. (Issue #145)
- Closed gaps in the handling of circular inheritance and attribute cycles.
- Circular dependencies are identified automatically and grouped into a small bundle; all other types are emitted as standalone files.
Load time reduced by approximately 98% (~120 s → ~2 s for CDM 6.0). (Issue #148)
The generator partitions types into two categories:
- Standalone (~94% of CDM types): each type is emitted to its own
.pyfile with annotations written directly in the class body. Nomodel_rebuild()is called at import time. - Bundled (~6% of CDM types): types involved in circular dependency cycles are grouped into
_bundle.pywithmodel_rebuild()called once per bundle.
Type aliases (typeAlias) are now resolved to their underlying Python types at generation time. Where multiple aliases would otherwise produce the same Python type name, unique disambiguating names are generated to avoid conflicts.
Note: Basic type constraints on a typeAlias (pattern, min/max length, numeric ranges) are propagated to the generated Python field. However, named condition blocks on a typeAlias are silently discarded — see RUNE_LANGUAGE_GAPS.md for details. In CDM, the only typeAlias carrying a named condition is FpMLCodingScheme, which is used exclusively for FpML codelist domain validation and delegates to the native function ValidateFpMLCodingSchemeDomain.
Internal generator refactoring to simplify code and support reuse:
- Introduced
PythonExpressionScopeto manage receiver context and lambda symbol shadowing during expression generation. - Multi-statement expressions that require intermediate values are now emitted as inline immediately-invoked lambdas rather than requiring function-level statement hoisting.
- Consolidated object, attribute, and expression generation to remove duplication and improve maintainability.
- Improved testing rigor and coverage.
- JUnit suite reorganized from 54 to 22 classes with consistent
Python*naming and less fragile assertions. - Python unit tests restructured so Rune filename, namespace, and pytest filename correspond without exception.
See RUNE_LANGUAGE_GAPS.md for the full feature coverage matrix.