Skip to content

[WIP] Add ToRecord to help convert Py dataclasses to Starlark records#46

Draft
inducer wants to merge 1 commit intomainfrom
to-record
Draft

[WIP] Add ToRecord to help convert Py dataclasses to Starlark records#46
inducer wants to merge 1 commit intomainfrom
to-record

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Nov 20, 2025

Non-working for now (in case that wasn't obvious from the bright-red CI).

Key obstacle: I wasn't even able to create a Starlark record type from Rust. I ran into the following obstacles:

  • RecordType lives in starlark::values::types, which is private.
  • I can get the record type as a Value, but if I call it, I need an evaluator. If I make a fresh one, then the resulting record lives in the wrong Heap.

The borrow checker is also upset about a few more borrows.

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.

1 participant