Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Rust): Implement TypeMeta part of the compatibility features #1789

Merged
merged 12 commits into from
Aug 5, 2024

Conversation

theweipeng
Copy link
Member

@theweipeng theweipeng commented Aug 4, 2024

What does this PR do?

Refine code struct and implement some compatibility features

  1. Split fury_meta file into individual files, as the file is too large to be easily read. There are a lot of features should be implemented by macro, split it is necessary.
  2. Implement compatibility by the macro, which will now generate a pattern match expression.
  3. Write type meta to binary when serializing objects.
  4. Read type meta for the pattern match which is generated at compile time when deserializing.
  5. Replace lazy_static by Once for it has been stabled in stdlib

Some unimplemented features

  1. Add a v-table for looking up generic methods by type_id, which is used for support the Any type.
  2. Support draining unused binary data when receiving an unregistered type.

@theweipeng theweipeng requested a review from chaokunyang as a code owner August 4, 2024 14:27
@chaokunyang
Copy link
Collaborator

Do we need to rename internal to serializer and rename resolvers to resolver to keep consistent with other languages?

Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

LGTM

@theweipeng theweipeng merged commit 0e18130 into apache:main Aug 5, 2024
32 checks passed
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