commit | 59cc47c3b9f83b9482c30f70b332ce68eabc93cc | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue Nov 14 03:10:06 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Nov 14 03:10:06 2023 +0000 |
tree | 40b5fb74851bbe10e4eedcb94a663faf615c15bb | |
parent | ade635fe114c2291bd7a9ca8112d8eae98790f3a [diff] | |
parent | d770ef02d402716726c2f4bc1874e0d1b80334dc [diff] |
Upgrade pdl-compiler to 0.2.3 am: 9c933187bc am: d770ef02d4 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2828637 Change-Id: I3f1cf5e74b9b82bfcd72a7f434e92c926fcd2065 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: