You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 5You have a lot of information, but I'm not sure what your question is. Can you clarify?Greg Burghardt– Greg Burghardt2024-12-03 22:41:46 +00:00Commented Dec 3, 2024 at 22:41
- 1Unless your data model happens to map directly to an existing serialization system, you're unlikely to find an existing code generator. For your sketch of the data model, arrays will be the tricky part. If these arrays all have statically known sizes, you're matching the C data model (without pointers) and can use existing tooling for creating C bindings. If arrays are encoded in any other way (e.g. prefixed with length), you will likely need a bespoke parser for your data format. I'd probably just write the codegen tool myself.amon– amon2024-12-03 22:52:19 +00:00Commented Dec 3, 2024 at 22:52
- @GregBurghardt My questions are: what are the comparative design costs to rolling this in-house versus using an off-the-shelf serialisation library; and do off-the-shelf frameworks for this kind of thing even exist?avigt– avigt2024-12-03 23:35:54 +00:00Commented Dec 3, 2024 at 23:35
- 3Unless your existing binary format matches a well-known described format, you are unlikely to find an existing library that can replicate your binary format.Bart van Ingen Schenau– Bart van Ingen Schenau2024-12-04 08:00:52 +00:00Commented Dec 4, 2024 at 8:00
- 1Just recently I stumbled across the Apache Kafka wire protocol and the mechanisms by which the reference implementation (in Java) and other language bindings map a (more or less strict) specification into code. I only took a closer look at the Python implementation, but it might be worth looking at the others, too. In the end, you'll likely need to roll your own, but having good examples is almost as good as a finished library.Hans-Martin Mosner– Hans-Martin Mosner2024-12-04 09:09:02 +00:00Commented Dec 4, 2024 at 9:09
| Show 4 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you