commit | 44f11d08ed04f140870115e2930f4de196dc5483 | [log] [tgz] |
---|---|---|
author | Henri Chataing <henrichataing@google.com> | Fri Nov 03 23:00:34 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Nov 03 23:00:34 2023 +0000 |
tree | 93b217f5b12c69e9ffe07cfae2289a9ebaf31379 | |
parent | a0dbf075f8502d9220d07e2989d6ca460bfb8291 [diff] | |
parent | fe5d6f1b23c4bd8aa053eb36e06d33b023541668 [diff] |
Upgrade pdl-compiler to 0.2.2 am: fe5d6f1b23 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2812414 Change-Id: I19f6b7e6858644e9be7fe0fd82933de9746edbfc 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: