commit | ae290114b002638ec5694cc0df5abf314c0e6681 | [log] [tgz] |
---|---|---|
author | David Duarte <licorne@google.com> | Tue Jun 04 00:34:17 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jun 04 00:34:17 2024 +0000 |
tree | ece4849b52cc8838865430cd1b93cc03cdbe3c8e | |
parent | ffc075afa2d15884a37b929cd35f1615462b046f [diff] | |
parent | 67a386da6a4243f5adf1733bf4c6679169f9d740 [diff] |
Upgrade pdl-runtime to 0.3.0 am: 67a386da6a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/3108708 Change-Id: Id1e82d2a2ab5a754ce8a8a8b79e4db2834dae5bf 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: