Skip to content

Support native execution contexts and composable field values - #210

Open
marmeladema wants to merge 1 commit into
masterfrom
elie/composable-native-context
Open

marmeladema wants to merge 1 commit into
masterfrom
elie/composable-native-context

Conversation

@marmeladema

Copy link
Copy Markdown
Collaborator

Allow filters to read application-owned Rust contexts and nested collections without first constructing stored LhsValue fields. Add context families, composable native value traits, and a field-definition macro that binds typed getters during compilation, with explicit startup validation of scheme coverage.

Preserve compiler hooks and the stored execution context as the default. Support borrowing contexts, required and optional getters, getter attributes, field metadata, and reusable evaluation state. Custom Compiler implementations must declare their context family; existing stored implementations can use StoredContextFamilySelf::U.

Traverse native keys, indices, and wildcards before materializing function arguments, preserving terminal map wildcard behavior. Share execution code through typed getter callbacks and common helpers. Reduce retained closure state by using compact native array indices and discarding literal formatting and redundant selection offsets during compilation.

@marmeladema
marmeladema force-pushed the elie/composable-native-context branch 3 times, most recently from 8d3e22a to 2eb6716 Compare November 13, 2026 17:45

@utkarshgupta137 utkarshgupta137 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're dropping support for old non-native paths, we should fully cleanup all of them & also rename/move stuff from src/native. Otherwise LGTM.

Allow filters to read application-owned Rust contexts and nested collections
without first constructing LhsValue fields. Use the same field-binding and reader
interfaces for runtime-typed LhsValue storage, including ExecutionContext as the
default and downstream field tables using LhsValueProvider.

Provide composable value traits, context families, and a field-definition macro
that binds typed getters during compilation. Support borrowing contexts, required
and optional getters, getter attributes, field metadata, and reusable context
state. Preserve Compiler hooks and hygienic access to application names in getters.

Validate scheme coverage and provider types during explicit startup validation,
including handwritten context families. The macro additionally validates duplicate
and extra definitions and getter optionality.

Select keys, indices, and [*] paths before materializing function arguments and
custom collection comparisons, preserving terminal map iteration compatibility.
Prepare fixed path splits during compilation and traverse concrete indices
without a preliminary scan. Reuse LhsValue traversal for function results and
move owned selections when flattening results.

Share comparison code through typed getter callbacks and common execution helpers.
Retain compact array indices and discard literal formatting and redundant selection
state during compilation. Group context APIs and value interfaces by purpose, with
value implementations alongside their types. Cover field readers, collection
traversal, ownership, validation, and getter hygiene with tests and benchmarks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants