commit | 51985abcd19d9b18a4364c4f42fd9af4379759fb | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sun Dec 17 02:17:49 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sun Dec 17 02:17:49 2023 +0000 |
tree | 7f329964d84aec6acacc4881c092e424d49a49a2 | |
parent | 8041cbd91f0f7684bc5f14e55a1f1c3c5a74a09b [diff] | |
parent | 2ce036f7b43c90877bdf4865120eb5da049c4871 [diff] |
Snap for 11228863 from 2ce036f7b43c90877bdf4865120eb5da049c4871 to emu-34-release Change-Id: I537b4d28a63a04f273ff73fd914a26c417842c2f
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: