2 releases

0.1.1 Aug 12, 2019
0.1.0 Aug 2, 2019

#1462 in Development tools

Download history 43/week @ 2024-03-11 61/week @ 2024-03-18 42/week @ 2024-03-25 54/week @ 2024-04-01 30/week @ 2024-04-08 46/week @ 2024-04-15 42/week @ 2024-04-22 44/week @ 2024-04-29 44/week @ 2024-05-06 44/week @ 2024-05-13 67/week @ 2024-05-20 38/week @ 2024-05-27 40/week @ 2024-06-03 23/week @ 2024-06-10 29/week @ 2024-06-17 23/week @ 2024-06-24

115 downloads per month

MIT license

52KB
1.5K SLoC

pdl Travis Build Status Appveyor Build status crate docs dependency status

Parse PDL file for the Chrome DevTools Protocol.

NOTE: PDL (pronounced as ˈpo͞odl) is a home-grown format to describe the DevTools protocol. PDL support, such as Sublime syntax highlighting and the json converter, is available at https://github.com/pavelfeldman/pdl.

Usage

To use pdl in your project, add the following to your Cargo.toml:

[dependencies]
pdl = "0.1"

Example

Use pdl::parse to parse a PDL file as strongly typed data structures.

let mut f = File::open("browser_protoco.pdl")?;
let mut s = String::new();
f.read_to_string(&mut s)?;

let (rest, proto) = pdl::parse(&s)?;

println!("PDL: {}", proto);
println!("JSON: {}", proto.to_json_pretty());

For more detail, please check the parser example.

$ cargo run --example parser -- browser_protocol.pdl --json --output browser_protocol.json

Resources

Dependencies

~7–510KB
~11K SLoC