29 releases

0.5.7 Feb 3, 2026
0.5.5 Jan 23, 2026
0.5.4 Dec 4, 2025
0.5.3 Nov 19, 2025
0.1.6 Nov 26, 2023

#93 in Programming languages

Download history 205/week @ 2025-12-28 187/week @ 2026-01-04 167/week @ 2026-01-11 164/week @ 2026-01-18 147/week @ 2026-01-25 186/week @ 2026-02-01 160/week @ 2026-02-08 162/week @ 2026-02-15 177/week @ 2026-02-22 292/week @ 2026-03-01 233/week @ 2026-03-08 375/week @ 2026-03-15 639/week @ 2026-03-22 486/week @ 2026-03-29 720/week @ 2026-04-05 409/week @ 2026-04-12

2,274 downloads per month
Used in 6 crates (via launchpadlib)

Apache-2.0 and maybe GPL-3.0+

175KB
4.5K SLoC

This crate contains a parser for the Web Application Description Language (WADL).

It can also generate basic rust bindings based on WADL files, if the codegen feature is enabled.

Example usage

Simply parsing the ast

let app: wadl::ast::Application = wadl::parse_file("1.0.wadl").unwrap();

println!("{:#}", app);

Generating code

Create a build.rs that generates rust code:

fn main() {
    let config = wadl::codegen::Config {
        // Set extra options here to influence code generation,
        // e.g. to rename functions.
        ..Default::default()
    };

    let wadl = std::fs::read_to_string(
            concat!(env!("CARGO_MANIFEST_DIR"), "/x.wadl")).unwrap();

    let wadl_app = wadl::parse_string(wadl.as_str()).unwrap();
    let code = wadl::codegen::generate(&wadl_app, &config);
    let target_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap())
        .canonicalize()
        .unwrap();
    let generated = target_dir.join("generated");
    std::fs::create_dir_all(&generated).unwrap();
    let path = generated.join("x.wadl");
    std::fs::write(path, code).unwrap();
}

Then, you can include the generated code from your rust code:

include!(concat!(env!("OUT_DIR"), "/generated/x.rs"));

Dependencies

~5–13MB
~220K SLoC