tag | 8950f1cd798716a763a9c0b32514d94fcc444db7 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Apr 23 15:27:34 2024 -0700 |
object | c62cf8350cc033c87f4502fe81d264e219a7e839 |
Platform Tools Release 35.0.1 (11580240)
commit | c62cf8350cc033c87f4502fe81d264e219a7e839 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 07 02:16:33 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 07 02:16:33 2024 +0000 |
tree | f91c5674b32b7c7960b0bccab434426de019774b | |
parent | 32f8d197df39b5b80d7764990144b631c3c51ad3 [diff] | |
parent | 8ced8b9d88e6817bcceed48e114a3eb9655bda26 [diff] |
Snap for 11541002 from 8ced8b9d88e6817bcceed48e114a3eb9655bda26 to sdk-release Change-Id: I815adba5c6b438b372f0f17df72dd809dba4d11c
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: