commit | 8d7dc6e23353d05613fda554d2c3e39e51acb89b | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Mon Sep 04 12:54:28 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Mon Sep 04 12:54:28 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | e367af11528aab73df3a42488059f2a8607c9211 [diff] | |
parent | c926f5b2ffcdda548241ea633c8d6b77975de1df [diff] |
Snap for 10758424 from c926f5b2ffcdda548241ea633c8d6b77975de1df to mainline-sdkext-release Change-Id: Ied558b0544777959f25ab9eaf272bbbb4f11900e
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: