commit | c57810df35580d7755d985921107e58d85f0e79f | [log] [tgz] |
---|---|---|
author | Jaewan Kim <jaewan@google.com> | Fri Jul 21 06:28:05 2023 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Jul 21 06:28:05 2023 +0000 |
tree | bfd879a08345d51825adf0032f86925b69dfde4b | |
parent | afcefe6794d7b84ca0fabd35fa05517e77be7015 [diff] |
Revert "Revert "Update pdl-compiler to 0.1.4"" This reverts commit afcefe6794d7b84ca0fabd35fa05517e77be7015. Reason for revert: Retry pdl-compiler update Bug: 292164619 Test: Build locally Change-Id: I70878f3622740019bc9f7da793a1de530aa3d473
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: