commit | 539be0ce88e2b8ff92bbd8e8133e74e9ad825696 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <qwandor@google.com> | Wed Nov 15 02:42:44 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Nov 15 02:42:44 2023 +0000 |
tree | 31bfbde306507249ed3a8e8e1dbbbf6b383c3152 | |
parent | 74954b40aec2ef8c70ce76f92c38c6bafa7da2f0 [diff] | |
parent | 60adb2ea6c74399fadb13c19d14598a8b085abe4 [diff] |
Migrate to cargo_embargo. am: 590d9e906d am: e1405e9915 am: 60adb2ea6c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2828319 Change-Id: I9d6e0e9eb46e7444ec0526a831008d59444671c1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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: