commit | 27f3222961c71e582932601bb5597a1c7cb1d71b | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Nov 16 00:13:38 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Nov 16 00:13:38 2023 +0000 |
tree | 31bfbde306507249ed3a8e8e1dbbbf6b383c3152 | |
parent | 26e50c43e4f90d0419ea926ad0847cf6cea3cc79 [diff] | |
parent | d7cdc35b9f773b7595b997f5d07d455aedc65ae0 [diff] |
Snap for 11104212 from d7cdc35b9f773b7595b997f5d07d455aedc65ae0 to 24Q1-release Change-Id: I7083fccb6641fc5737606478d9a562061ba265d9
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: