commit | abe09d5a52a374646b6c29fbdecc2e7ae13ba642 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun Jun 09 07:11:48 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun Jun 09 07:11:48 2024 +0000 |
tree | ece4849b52cc8838865430cd1b93cc03cdbe3c8e | |
parent | 6115f84cce285ab2172a9ba6d9645804c60f3e6d [diff] | |
parent | 92a6f475db821c8a4d27aec54b783213c61e8539 [diff] |
Snap for 11933214 from 92a6f475db821c8a4d27aec54b783213c61e8539 to busytown-mac-infra-release Change-Id: Iba750e44d88ba607ab6000beef3b6842383f1468
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: