commit | f2aa97cf4f8635737a58c3aef1a480650877de65 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <[email protected]> | Wed Nov 15 02:13:03 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Nov 15 02:13:03 2023 +0000 |
tree | 31bfbde306507249ed3a8e8e1dbbbf6b383c3152 | |
parent | 60adb2ea6c74399fadb13c19d14598a8b085abe4 [diff] | |
parent | 92b814bd342eac6784554f31bd0d370c2dddfe40 [diff] |
Migrate to cargo_embargo. am: 590d9e906d am: 92b814bd34 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2828319 Change-Id: I4dff1a5b52004b44723486ade911bd057cdb3290 Signed-off-by: Automerger Merge Worker <[email protected]>
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: