Skip to content

Allow custom records to be created from rust. - #215

Open
matts1 wants to merge 1 commit into
facebook:mainfrom
matts1:push-tuoqtuxmkqkv
Open

Allow custom records to be created from rust.#215
matts1 wants to merge 1 commit into
facebook:mainfrom
matts1:push-tuoqtuxmkqkv

Conversation

@matts1

@matts1 matts1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This is a follow-up on #199.

This does the following:

  • Add new() constructor on records, allowing you to create records.
  • Make FrozenRecord and FrozenRecordType pub, allowing you to work directly with frozen records (in my use case, for example, record types are frozen into globals so we don't need unfrozen record types).
  • Add len to record types, allowing you to preallocate capacity via Vec::with_capacity before calling new() above.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2026
@matts1
matts1 force-pushed the push-tuoqtuxmkqkv branch from da6a863 to 6d6ee92 Compare July 16, 2026 03:28
@meta-codesync

meta-codesync Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request has been imported. If you are a Meta employee, you can view this in D112259896. (Because this pull request was imported automatically, there will not be any future comments.)

@matts1
matts1 force-pushed the push-tuoqtuxmkqkv branch 3 times, most recently from 86f0dfa to 2dcff9e Compare July 16, 2026 04:50
This is a follow-up on facebook#199.

This does the following:
* Add `new()` constructor on records, allowing you to create records.
* Make FrozenRecord and FrozenRecordType pub, allowing you to work
  directly with frozen records (in my use case, for example, record
  types are frozen into globals so we don't need unfrozen record
  types).
* Add len to record types, allowing you to preallocate capacity via
  Vec::with_capacity before calling `new()` above.
@matts1
matts1 force-pushed the push-tuoqtuxmkqkv branch from 2dcff9e to d6e5a6b Compare July 16, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant