tag | ef8717d9c3d986326522607920237937043c4e12 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Jan 30 13:25:43 2024 -0800 |
object | 610897734909c6a0ef52a12434b34ae30f849ae6 |
Platform Tools Release 34.0.5 (10900879)
commit | 610897734909c6a0ef52a12434b34ae30f849ae6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Dec 13 00:12:20 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Dec 13 00:12:20 2023 +0000 |
tree | 31bfbde306507249ed3a8e8e1dbbbf6b383c3152 | |
parent | d1a96093e8972dfa5692b125bc28e978cef8a720 [diff] | |
parent | e1405e9915629423871c489c6b833c9790200bdf [diff] |
Snap for 11211409 from e1405e9915629423871c489c6b833c9790200bdf to sdk-release Change-Id: Id68575492c5e0c4fa735ddf87d975b593c4489ef
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: