commit | d3df7bf87306b9411491c2966b14b8560d4a7033 | [log] [tgz] |
---|---|---|
author | Sam Saccone <[email protected]> | Thu Oct 05 19:08:06 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Oct 05 19:08:06 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | fd345af7c2ebeafe56ab2a603eb74bc406c9cd74 [diff] | |
parent | bbe2c6b19b779493d803d690d6f92479667a7184 [diff] |
Move OWNER reference master=>main. am: bb99dc8b51 am: bbe2c6b19b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2661144 Change-Id: Ice9958ea80237dd2c8014ba9d93d34ce93ef8e04 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: