commit | c926f5b2ffcdda548241ea633c8d6b77975de1df | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Sun Aug 13 04:24:29 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Sun Aug 13 04:24:29 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | 63679968fab712d96902ae57d108dc7d1add990f [diff] | |
parent | b32d1823b491678db6f89438450945e8c973b5e2 [diff] |
Upgrade pdl-compiler to 0.1.6 am: b32d1823b4 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2705926 Change-Id: Ied784d8bd5c1a364162a40f2d7c0a44136c0d524 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: