commit | 090e62178d75070f2fc09cfec322f4fe55c8b102 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Oct 29 18:33:45 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Oct 29 18:33:45 2024 +0000 |
tree | 32b8ee06e5e20d00c291332965a6392921fc997f | |
parent | 3eb405baa0b53c99593e4803ff7c041400042aad [diff] | |
parent | 6de3c25c3a5b06b73d2d558394a91f0540b00c8d [diff] |
Snap for 12572747 from 6de3c25c3a5b06b73d2d558394a91f0540b00c8d to build-tools-release Change-Id: Iec78aa1aa7f8486d673e85b85a19102d78d49d11
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: