commit | 866fc0d84e401e9fb3a1aab25a323c5a83bea706 | [log] [tgz] |
---|---|---|
author | David Duarte <[email protected]> | Wed May 29 16:56:47 2024 +0000 |
committer | David Duarte <[email protected]> | Fri May 31 21:22:00 2024 +0000 |
tree | cfba6e67bace17fd08ec4517651366aa49ce9ac3 | |
parent | c531765b77c435b38284299e12332d8ecf628437 [diff] |
Upgrade pdl-compiler to 0.3.0 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/pdl-compiler For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: Ie7711ab1c41a8628235f3125c9db3a189cffacbf
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: