commit | cca14cb6b7ddc556ea367f6c736396889ce79b2d | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue Sep 24 19:32:17 2024 +0000 |
committer | James Farrell <[email protected]> | Tue Sep 24 19:32:17 2024 +0000 |
tree | a1a1840524d99c5dc51021a26cf43e39260dfd25 | |
parent | 6b41354b60d62ce3694adb36f4d9ed4462821d35 [diff] |
Update Android.bp by running cargo_embargo Test: ran cargo_embargo Change-Id: Id6640e421daf2fd8140af5e5547201cd548872c1
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: