commit | c1be9b6b146c669fc3863de3ff08f10d6dca1dff | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Sat Nov 04 00:03:41 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Sat Nov 04 00:03:41 2023 +0000 |
tree | 93b217f5b12c69e9ffe07cfae2289a9ebaf31379 | |
parent | 17f91929a66f0b2f6872ac854c4930e87fb9a33d [diff] | |
parent | c34d110ea23f145818cb7e26371d251dd2f6b75d [diff] |
Upgrade pdl-compiler to 0.2.2 am: fe5d6f1b23 am: c34d110ea2 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2812414 Change-Id: Ieaf2f614364a83db62453ebe1b8a6542d6a8ba9b 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: