commit | 791671b63502e647d0321a7c4ec3184d9eca7aea | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue Jul 16 17:44:10 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Jul 16 17:44:10 2024 +0000 |
tree | a692e99487865646b4c6f0b4f954f214510e10fe | |
parent | daf0da49e66ba1edd37602374120b34589ba0fda [diff] | |
parent | 2f616e0485818d387c421973a77b271441812de7 [diff] |
Upgrade pdl-runtime to 0.3.1 am: 2f616e0485 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/3174223 Change-Id: I338e1e7a728b4ad44fb356183141c6b810a4c425 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: