-
Notifications
You must be signed in to change notification settings - Fork 2
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
Consider writing specs directly in Kaitai Struct language #66
Comments
Hello there and thank you for your message! Do you have more experience with it? Could you provide an example on how you would expect this to look like? |
We mostly use nightly versions, releases don't have the latest tasty features.
It depends a lot.
We have a repo for ready-to use specs.. Everything is very straightforward - if you have an uint32_t field and a string of size specified by that field, you just write - id: str_size
#type: u4le # endianness is usually put into meta
type: u4
- id: super_str
type: str
size: str_size
#encoding: utf-8 # usually put into meta |
While Kaitai has excellent declarative syntax, it still don't have serializer from *.ksy into native code. So there only parsing features. |
Well, it seems applying this would need some work. The easier and more incomplete approach would be a bottom-up approach - document all the internal structures and leave only the resource extraction to the reader. With my private time reduced to work on this project I have to stay within budget of how many unknowns to handle at once. |
If it is possible, this would allow them to be transpiled into a ready-to-use parser for multiple languages, including python, rust and c++. Human-readability is not expected to be harmed, since the lang is declarative.
The text was updated successfully, but these errors were encountered: