commit | bd677f30d937385f05b5bfb296c500fa6ace03a5 | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Wed May 08 21:48:25 2024 +0000 |
committer | James Farrell <jamesfarrell@google.com> | Wed May 08 21:48:25 2024 +0000 |
tree | a663b04ca2888c121ad2f18f93e3128b7ca2e885 | |
parent | fe8259d830ff106945047415548a712325e836ce [diff] |
Update Android.bp by running cargo_embargo Test: ran cargo_embargo Change-Id: I3fde3b74d1415cf4313efb3ca98f56e31a9d3ca2
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: