commit | 9b20adba948939bd8f37392da14b1b8f25efc380 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Oct 16 16:19:19 2024 +0000 |
committer | James Farrell <[email protected]> | Wed Oct 16 16:19:19 2024 +0000 |
tree | b70029532c7bdeb185bf8359f29b669a7d2835b8 | |
parent | cca14cb6b7ddc556ea367f6c736396889ce79b2d [diff] |
Add a patch file for scripts/Android.bp. Bug: http://b/339424309 Test: treehugger Change-Id: I4c542b88d0b046918663709364299a2c98906aaa
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: