A word on Arduino/PlatformIO compatibility #329
Replies: 3 comments
-
|
Clarification: Java is actually using a binary library, too |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the kind words and heads up on Arduino - I will update that doc section. Yes I agree that building just from source should be more directly accessible. It is an important aspect. I is just difficult to keep all the important information first in the document, so some things have migrated downwards over time. I think the C++ team is doing a great job, but they target modern C++, not every conceivable compilation target, which is a key difference between flatc and flatcc. If you are aware of actual issues in C++ that are not merely platform support related, I think you should make a bug report. I cannot commit to a major overhaul of the doc. I have updated it whenever users have had issues, and this seems to work, since I hear about many of the usability issues that appeared more frequently earlier on. If anyone are up for reworking the doc with materials for mkdocs, and test the code examples in the builder (which are not 100% correct in all cases), that would be a great contribution. As for everything is code: I'm not sure about that. I think everything should be easily compilable from source, but not like GB+ javascript libraries. As you have discovered, essentially all languages have a library part. But to be fair to FlatCC, the common files are an attempt to generate as much as is reasonable so the core library routines essentially never change. Flatbuffers for C++ has the advantage of C (at least used to) that it can have read-only in a single template based header file. This does not work for C because:
Especially the requirement for the include/flatcc directory can be annoying. It is low overhead once compiled, but it is necessary to deal the many platforms out there, which C++ does not handle as well. The single builder .c file is actually pretty trivial in comparison since you can just add it to your project (if you know about). Overall, FlatCC is really pushing the C language to its limits when trying to support generic generated code without exploding the generated output. |
Beta Was this translation helpful? Give feedback.
-
|
I added https://github.com/dvidelabs/flatcc?tab=readme-ov-file#integrating-flatcc And removed the at least reader part for the Arduino mention. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello flatcc team.
First and foremost, let me express my utmost gratitude to all of you for building and maintaining such a great project.
I struggled a lot with Google's official C++ codegen and it just didn't work fully for me. Moreover, it introduced some nonsense related to root objects, which shouldn't be there, but most importantly, it wouldn't serialize and deserialize FlatBuf objects as expected (at least on PlatfromIO/RP2040).
So I was super-happy to find flatcc and migrated immediately. Predictably, the reader worked immediately and out of the box. And as much is denoted in your documentation:
Yesterday night, however, I stumbled upon the following parts of the docs:
And only later I found the following information in a rather unlikely section:
Significantly, before finding that last bit of information, I sort of "rediscovered" the same approach by trial and error and ended up doing just that to add builder support to my PlatformIO project, which so far worked flawlessly and without a single issue.
Given that experience, I'd like to provide a bit of feedback, all of which is IMO.
And lastly, since builder worked for me on Arduino, the following line in your docs can be updated:
Here's my proof-commit: flower-org/phraser@2ba30cb
Apologies for the emotional comment there.
And huge thanks to all the flatcc team again, you're doing an amazing job!
Beta Was this translation helpful? Give feedback.
All reactions