Skip to main content

Crate wdl_modules

Crate wdl_modules 

Source
Expand description

Implementation of the WDL module specification.

wdl-modules provides the local, deterministic pieces of WDL module handling: module.json manifest parsing, module-lock.json lockfile parsing, symbolic import paths, deterministic content hashing, Ed25519 module.sig signing and verification, SPDX license validation, and module file-tree checks.

§Quickstart

Parse module.json with Manifest::parse, parse module-lock.json with Lockfile::parse, and compute a content hash with hash::hash_directory. These entry points reject duplicate JSON object keys, invalid relative paths, invalid dependency declarations, and module trees that violate the reserved-filename or Unicode-normalization rules.

use wdl_modules::Manifest;

let manifest = Manifest::parse(
    br#"{
        "name": "spellbook",
        "version": "1.0.0",
        "license": "MIT"
    }"#,
)?;

assert_eq!(manifest.name, "spellbook");

Re-exports§

pub use crate::lockfile::Lockfile;
pub use crate::manifest::Manifest;

Modules§

dependency
Dependency names and sources for module.json.
hash
Content hashing per the WDL module spec.
license
SPDX license expression validation.
lockfile
module-lock.json lockfile parsing and validation.
manifest
module.json manifest parsing and validation.
module_walk
Safe module-content tree walk shared by hashing, verification, resource-limit checking, and materialization.
relative_path
A validated, canonical, NFC-normalized relative path under a module root.
signing
Ed25519 signing and verification, plus the module.sig file format.
symbolic_path
Symbolic-module-path parsing.
tree
Validation rules for the module file tree.
version_requirement
Version-requirement type wrapping a constrained subset of semver::VersionReq.

Constants§

DEFAULT_ENTRYPOINT_FILENAME
The default filename of a module entrypoint, used when Manifest::entrypoint is not set.
DEFAULT_README_FILENAME
The default filename of a module readme, used when Manifest::readme is Readme::Default.
LOCKFILE_FILENAME
The filename of a module lockfile.
MANIFEST_FILENAME
The filename of a module manifest.
SIGNATURE_FILENAME
The filename of a module signature.