commit | 79ebf5bd2fa6a94cfc7148f693eed35e3f0534b9 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Sep 02 20:58:52 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Sep 02 20:58:52 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | cd64d51947e674fe822d764c924463eac17df379 [diff] | |
parent | c926f5b2ffcdda548241ea633c8d6b77975de1df [diff] |
Snap for 10755155 from c926f5b2ffcdda548241ea633c8d6b77975de1df to mainline-art-release Change-Id: Iff710949e6ecb9cef203738d72049c0a79f7379a
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: