commit | 26e50c43e4f90d0419ea926ad0847cf6cea3cc79 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Nov 09 00:13:07 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Nov 09 00:13:07 2023 +0000 |
tree | 533e1e85df6741e67c9256226869e50df319fb45 | |
parent | 5d2626c02101f81a61461f07d46f27b9c20ec197 [diff] | |
parent | 74954b40aec2ef8c70ce76f92c38c6bafa7da2f0 [diff] |
Snap for 11071763 from 74954b40aec2ef8c70ce76f92c38c6bafa7da2f0 to 24Q1-release Change-Id: I98ff6edff320766babaffff449491432ebb098c8
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: