commit | 7207476bff709e84ca9164c5176209b8b612a319 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Thu Jul 13 22:01:55 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Jul 13 22:01:55 2023 +0000 |
tree | bfd879a08345d51825adf0032f86925b69dfde4b | |
parent | 5a685899cde87c8b2796e2cb4cff128b01c1e106 [diff] | |
parent | 157747f2482e437bbb787f5d9bb5bfa3c578f4c8 [diff] |
Update pdl-compiler to 0.1.4 am: 157747f248 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2655345 Change-Id: I87d20877e84c1e4dc05fd7ca5374cecb4023731f Signed-off-by: Automerger Merge Worker <[email protected]>
PDL is a domain specific language for writing the definition of binary protocol packets. Parsing and validating packets from raw bytes is tedious and error prone in any language. PDL generates memory safe and tailored backends for multiple target languages:
- Rust - C++ - Python
Historically PDL was developed as part of the Android Bluetooth stack (bluetooth_packetgen) as a way to generate the parser and serializer for Bluetooth packets, and reduce the number of memory safety issues that come with manipulating and validating raw data.
cargo run my-protocol.pdl --output-format rust > my-protocol.rs
Language specific instructions are provided for all supported backends: