Expand description
Manifest and lockfile format types for WebAssembly packages.
This crate provides types for parsing and serializing WASM package manifests
(wasm.toml) and lockfiles (wasm.lock).
§Example: Parsing a Manifest
use wasm_manifest::Manifest;
let toml = r#"
[interfaces]
"wasi:logging" = "ghcr.io/webassembly/wasi-logging:1.0.0"
"#;
let manifest: Manifest = toml::from_str(toml).unwrap();§Example: Parsing a Lockfile
use wasm_manifest::Lockfile;
let toml = r#"
lockfile_version = 2
[[interfaces]]
name = "wasi:logging"
version = "1.0.0"
registry = "ghcr.io/webassembly/wasi-logging"
digest = "sha256:abc123"
"#;
let lockfile: Lockfile = toml::from_str(toml).unwrap();Structs§
- Lockfile
- The root lockfile structure for a WASM package.
- Manifest
- The root manifest structure for a WASM package.
- Package
- A resolved package entry in the lockfile.
- Package
Dependency - A dependency reference within a package.
- Resolved
Permissions - Fully resolved permissions with no optional fields.
- RunPermissions
- Sandbox permissions for executing a Wasm Component.
Enums§
- Dependency
- A dependency specification in the manifest.
- Package
Type - The type of a WASM package.
- Validation
Error - Error type for validation failures.
Constants§
- LOCKFILE_
VERSION - The current revision of the lockfile.
Functions§
- validate
- Validates that a lockfile is consistent with its manifest.