commit | 97f74011e835bbdf51fd6715b3bcd5a79d191311 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue May 21 15:03:54 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue May 21 15:03:54 2024 +0000 |
tree | c93e0fb668b84918c7f625744efe3145a2af51a9 | |
parent | 3c93402be13c2561a12fd97c4f234b9bcfe81f8c [diff] | |
parent | ffc075afa2d15884a37b929cd35f1615462b046f [diff] |
Update Android.bp by running cargo_embargo am: 59ecc82ea1 am: ffc075afa2 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/3093013 Change-Id: I8ed3f522b8d7531b131f66682e37162979802c77 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: