commit | 17f91929a66f0b2f6872ac854c4930e87fb9a33d | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Fri Nov 03 23:29:27 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Nov 03 23:29:27 2023 +0000 |
tree | 93b217f5b12c69e9ffe07cfae2289a9ebaf31379 | |
parent | c3e01062da960236d4abdff7cb007a4c52c585c3 [diff] | |
parent | 44f11d08ed04f140870115e2930f4de196dc5483 [diff] |
Upgrade pdl-compiler to 0.2.2 am: fe5d6f1b23 am: 44f11d08ed Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2812414 Change-Id: Ie6c046f6e037656513d690cca25166a8be73dd62 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: