commit | 6115f84cce285ab2172a9ba6d9645804c60f3e6d | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun May 26 07:10:10 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun May 26 07:10:10 2024 +0000 |
tree | c93e0fb668b84918c7f625744efe3145a2af51a9 | |
parent | c62cf8350cc033c87f4502fe81d264e219a7e839 [diff] | |
parent | 7e9ba59657cd52519d2c0bc17717ac45830e0ec0 [diff] |
Snap for 11878398 from 7e9ba59657cd52519d2c0bc17717ac45830e0ec0 to busytown-mac-infra-release Change-Id: I909c32e10004e3f3e6beff6c55c6f4325c1546a4
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: