commit | 6de3c25c3a5b06b73d2d558394a91f0540b00c8d | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Thu Oct 17 15:37:15 2024 +0000 |
committer | James Farrell <jamesfarrell@google.com> | Thu Oct 17 15:47:30 2024 +0000 |
tree | 32b8ee06e5e20d00c291332965a6392921fc997f | |
parent | 9b20adba948939bd8f37392da14b1b8f25efc380 [diff] |
Migrate pdl-compiler to monorepo. Bug: http://b/339424309 Test: treehugger Change-Id: Iefb5f16611afc2e8672a137a114f026b9576d9fa
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: