Rust library for Workflow Description Language (WDL).
Currently, there is an #AST and parsers based on both #tree-sitter and #pest. There are plans to add a type-checker and expression evaluator.
use std::path::Path;
use wdl::{ast::VersionIdentifier, ast::DocumentElement, parsers::pest::PestParser};
fn main() {
let wdl_path = Path::new("/path/to/workflow.wdl");
let doc = PestParser::parse_file(wdl_path)?;
assert_eq!(doc.version.identifier, VersionIdentifier::V1_1);
for element in doc.body {
match *element {
DocumentElement::Import(i) => ...,
}
}
}