commit | 8b898017f1b19c97241a0678bc317be9de8f794a | [log] [tgz] |
---|---|---|
author | Henri Chataing <henrichataing@google.com> | Fri Nov 03 23:35:15 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Nov 03 23:35:15 2023 +0000 |
tree | 93b217f5b12c69e9ffe07cfae2289a9ebaf31379 | |
parent | 0231e146b6ca2dcb0aac285cae5f793521d8187c [diff] | |
parent | 17f91929a66f0b2f6872ac854c4930e87fb9a33d [diff] |
Upgrade pdl-compiler to 0.2.2 am: fe5d6f1b23 am: 44f11d08ed am: 17f91929a6 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2812414 Change-Id: Ia07ee28f7aacc8c1360f4d4e1ea67a2c41e2f73f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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: