commit | 8ed7e7f0ee3848ed0e2c02ba7bab7d4d0bed14b4 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Dec 15 09:28:42 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Dec 15 09:28:42 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | 5a685899cde87c8b2796e2cb4cff128b01c1e106 [diff] | |
parent | 5ad493ce1a6d335af300f7a2b6369b0a9de317f4 [diff] |
Snap for 11224086 from 5ad493ce1a6d335af300f7a2b6369b0a9de317f4 to mainline-tzdata5-release Change-Id: I41ce1803062e041fc3ce9b9b6b431e5748ca92fc
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: