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::dependency::DependencyName;pub use crate::dependency::DependencyNameError;pub use crate::dependency::DependencySource;pub use crate::dependency::DependencySourceError;pub use crate::dependency::GitSelector;pub use crate::hash::ContentHash;pub use crate::hash::HashError;pub use crate::hash::Hasher;pub use crate::license::LicenseError;pub use crate::license::LicenseExpression;pub use crate::lockfile::DependencyEntry;pub use crate::lockfile::DependencyMap;pub use crate::lockfile::GitCommit;pub use crate::lockfile::GitCommitError;pub use crate::lockfile::LOCKFILE_VERSION;pub use crate::lockfile::Lockfile;pub use crate::lockfile::LockfileError;pub use crate::lockfile::ResolvedSource;pub use crate::manifest::Manifest;pub use crate::manifest::ManifestError;pub use crate::manifest::Readme;pub use crate::manifest::Tool;pub use crate::relative_path::RelativePath;pub use crate::relative_path::RelativePathError;pub use crate::signing::KeyError;pub use crate::signing::ModuleSignature;pub use crate::signing::Signature;pub use crate::signing::SignatureError;pub use crate::signing::SignatureFileError;pub use crate::signing::SigningKey;pub use crate::signing::VerifyError;pub use crate::signing::VerifyingKey;pub use crate::symbolic_path::SymbolicPath;pub use crate::symbolic_path::SymbolicPathError;pub use crate::tree::TreeError;pub use crate::tree::validate_tree;pub use crate::version_requirement::VersionRequirement;pub use crate::version_requirement::VersionRequirementError;
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.jsonlockfile parsing and validation.- manifest
module.jsonmanifest parsing and validation.- relative_
path - A validated, canonical, NFC-normalized relative path under a module root.
- signing
- Ed25519 signing and verification, plus the
module.sigfile 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::entrypointis not set. - DEFAULT_
README_ FILENAME - The default filename of a module readme, used when
Manifest::readmeisReadme::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.