commit | cb619f8b2b8336cdddebe5d2c6bb9a5f5370d5d5 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed Nov 15 00:13:08 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed Nov 15 00:13:08 2023 +0000 |
tree | 40b5fb74851bbe10e4eedcb94a663faf615c15bb | |
parent | 32daa7f814fca0daac1dca092caff795af682c5b [diff] | |
parent | 57276d0c72f294b4bb3ad2eba51683488261cedf [diff] |
Snap for 11097608 from 57276d0c72f294b4bb3ad2eba51683488261cedf to 24Q1-release Change-Id: I94b550fdc1d2a80eb499afc2780db26cef43af7c
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: