commit | 2669c2ff6c0d6410942b54982b5492ceb9c4f0f6 | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Mon May 20 16:59:41 2024 +0000 |
committer | James Farrell <jamesfarrell@google.com> | Mon May 20 16:59:41 2024 +0000 |
tree | 61b23dbcf4832ffec58313f49fc92b8d9261fd40 | |
parent | bd677f30d937385f05b5bfb296c500fa6ace03a5 [diff] |
Update Android.bp by running cargo_embargo Test: ran cargo_embargo Change-Id: I5e54c200df93543ce01fa658d17e0e1653f0362b
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: