-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Rust full reflection #8102
base: master
Are you sure you want to change the base?
Rust full reflection #8102
Conversation
3ea581d
to
7e5b92b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of small things. Feel free to ignore nits if they don't seem worthwhile.
Great work overall!
0ee84d1
to
6868cb3
Compare
@candysonya @dextero We are using flatbuffers at work and I have a small patch that allows us to have zero-allocation of flatbuffer messages. I noticed that this change makes all the &'static str into String. Is this strictly necessary? Could it be Cow<'static, str>? |
Thanks for pointing it out! I've just updated the change with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the changes to Cow<'static, str>
. This is an awesome patch set and I'm really excited to have reflection! My comments are a few cases where you used .to_string()
but I believe that .into()
should work instead to make the value into a Cow
and not a String
. I could be wrong though and in that case feel free to ignore my comments
73bd124
to
913d257
Compare
Thanks so much for spotting that! |
c9465ba
to
88b2f0d
Compare
88b2f0d
to
f2f7f93
Compare
cc95976
to
358d6e5
Compare
This pull request is stale because it has been open 6 months with no activity. Please comment or label |
I do care about this feature. I may pick it up if @candysonya is unavailable. |
not-stale |
Hi @brt-adam-snaider , yes please feel free to pick it up. Do you already have a plan? |
Hi @brt-adam-snaider , I'm considering picking it up. Before that, may I know if you're already working on this? |
I haven't picked it up yet. Have at it :) |
7d2ea1f
to
6ed63ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for following through on this!
We'll need an owner approval, I can't grant one unfortunately.
ad5edac
to
d3f36c9
Compare
Some CI issues with Rust. Can you take a look? It should auto run now next time you push to the PR. |
f3b65ea
to
ceb2218
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few nits, mostly about how some errors could be avoided by reorganizing the code a bit. LGTM overall, great work!
It verifies buffer against schema during construction and provides all the unsafe getters in lib.rs in a safe way
0b5d56c
to
2986c39
Compare
(My teammate dextero has kindly helped to review the PR and left a lot of insightful comments. Unfortunately they are not a member of the community and they cannot approve it. Currently all the comments have been resolved and it would be highly appreciated if it could be reviewed by the community because the reflection feature in Rust is a blocker for our team to use Flatbuffers!)
Compared to the C++ implementation of the reflection feature,
It includes:
It doesn't include:
VectorOfAny
(Vector without element type specified)TODOs on C++ side are retained.