commit | e1405e9915629423871c489c6b833c9790200bdf | [log] [tgz] |
---|---|---|
author | Andrew Walbran <[email protected]> | Wed Nov 15 01:39:19 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Nov 15 01:39:19 2023 +0000 |
tree | 31bfbde306507249ed3a8e8e1dbbbf6b383c3152 | |
parent | 27eb0ace086dcef97e82f7111a73266ad41003e7 [diff] | |
parent | 590d9e906d59114fa13a7e265ac0b9d3b2abac63 [diff] |
Migrate to cargo_embargo. am: 590d9e906d Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2828319 Change-Id: I9df96fcf52689ad03dd89c2f4263fbbe45965c6d 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: