Skip to content

Rust crates for working with Workflow Description Language (WDL) documents.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

stjude-rust-labs/wdl

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

957f2ca · Jul 12, 2024
Jun 22, 2024
Jul 12, 2024
Jul 12, 2024
Jun 28, 2024
Jun 28, 2024
Jul 3, 2024
Jul 12, 2024
Apr 10, 2024
Jul 1, 2024
Jul 3, 2024
Jul 1, 2024
Nov 22, 2023
Nov 22, 2023
Jun 17, 2024
Jun 14, 2024
Dec 17, 2023

Repository files navigation

wdl

CI: Status crates.io version crates.io downloads License: Apache 2.0 License: MIT

Rust crates for working with Workflow Description Language (WDL) documents.
Explore the docs »

Request Feature · Report Bug · ⭐ Consider starring the repo! ⭐

📚 Getting Started

The wdl family of crates consists of (a) a number of component crates (any crate that is not explicitly wdl) that are developed and versioned independently, and (b) a convenience crate (the wdl crate) that exists to ease syncing compatible component crates versions. Component crates can be enabled using features and are generally re-exported crates without the wdl- (or wdl_) prefix.

This repository contains crates that can be used to work with WDL within your own Rust projects—if you're looking for a command-line tool built on top of these crates instead, you should check out sprocket.

Convenience Crate

Most users should prefer selecting a version of the convenience crate and enabling features as they wish. For example,

cargo add wdl --features grammar

and then

use wdl::grammar;

Component Crate(s)

You are free to include component crates directly. For example,

cargo add wdl_grammar

and then

use wdl_grammar;

Be aware, however, that versions between component crates are explicitly not compatible. In other words, if you choose not to use the convenience crate, it is not simple to derive which crate versions are compatible, and you'll need to manually sync those. We highly recommend using the convenience crate if you intend to use more than one component crate in conjunction.

✨ The wdl CLI tool

The wdl CLI tool provides commands to assist in the development of the wdl family of crates.

The wdl CLI tool can be run with the following command:

cargo run --bin wdl --features binaries -- $ARGS

Where $ARGS are the command line arguments to the wdl CLI tool.

The wdl CLI tool currently supports three subcommands:

  • parse - Parses a WDL source file and prints both the parse diagnostics and the resulting Concrete Syntax Tree (CST).
  • check - Parses and validates a WDL source file. Exits with a status code of 0 if the file is syntactically valid; otherwise, prints the validation diagnostics and exits with a status code of 1.
  • lint - Parses, validates, and runs the linting rules on a WDL source file. Exits with a status code of 0 if the file passes all lints; otherwise, prints the linting diagnostics and exits with a status code of 1.

Each of the subcommands supports passing - as the file path to denote reading from STDIN instead of a file on disk.

🖥️ Development

To bootstrap a development environment, please use the following commands.

# Clone the repository
git clone git@github.com:stjude-rust-labs/wdl.git
cd wdl

# Build the crate in release mode
cargo build --release

# List out the examples
cargo run --release --example

🚧️ Tests

Before submitting any pull requests, please make sure the code passes the following checks (from the root directory).

# Run the project's tests.
cargo test --all-features

# Run the tests for the examples.
cargo test --examples --all-features

# Ensure the project doesn't have any linting warnings.
cargo clippy --all-features

# Ensure the project passes `cargo fmt`.
# Currently this requires nightly Rust
cargo +nightly fmt --check

# Ensure the docs build.
cargo doc

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

📝 License

This project is licensed as either Apache 2.0 or MIT at your discretion.

Copyright © 2023-Present St. Jude Children's Research Hospital.