I want to program weak embedded devices, so I want to use binary files as input data. So there is no need for expensive complicated parsing. Meaning: No Text-Files of any kind (XML, JSON, etc.).
But XML & JSON have been such a huge success because they're kind of self-documenting and easy to read - by humans. Still: Like Garbage Collection, this comfort doesn't come for free. One of the reasons Rust exists: You can't just always ignore Garbage Collection as "it's not thaaat expensive".
But the only way to document a binary file-format in a standardized way I know is DFDL. Where is no big support in Rust and in general. I tried a whole day to get a good workflow with DFDL, but couldn't, and I still miss good IDE support.
I then thought: What binary data format is (almost) universally supported, in almost every programming language? Answer: SQLite. Think about it:
- High efficiency in reading and writing. But: The SQL text-to-binary parser doesn't come for free, maybe that's killing it?
- Reasonable file sizes, only a little bit wasteful. I only wouldn't want it in the weakest embedded devices.
- The whole database is in one file!
- Constantly maintained support for every major programming language I can think of.
- Sea of tools to read and write it.
- Works w/o server.
- Easily extendable format.
- While mostly an efficient binary format, still self-documenting through table-names, column-names, constraints, data-types and relations.
But still: While it fits all my criteria, it doesn't feel right to use a DB for that. So, if you see flaws in my thoughts, please, tell me what they are and sell me a better solution.