1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Manifest and lockfile format, resolver, and profile state for the
//! loadsmith mod-manager library.
//!
//! This is an internal crate of the [`loadsmith`] workspace. Most consumers
//! should depend on the `loadsmith` facade crate instead of using this
//! crate directly.
//!
//! # Examples
//!
//! Create a lockfile and compute a diff between two revisions:
//!
//! ```rust
//! use loadsmith_core::{FileUrl, PackageRef, Version};
//! use loadsmith_manifest::{Diff, LockedPackage, Lockfile};
//!
//! let url = FileUrl::try_from_url("https://example.com/pkg.zip").unwrap();
//!
//! let old = Lockfile::new(vec![
//! LockedPackage::new(PackageRef::new("Author-A", Version::new(1, 0, 0)), "thunderstore", url.clone()),
//! ]);
//!
//! let new = Lockfile::new(vec![
//! LockedPackage::new(PackageRef::new("Author-B", Version::new(1, 0, 0)), "thunderstore", url),
//! ]);
//!
//! let diff = old.diff(&new);
//! assert_eq!(diff.added.len(), 1);
//! assert_eq!(diff.removed.len(), 1);
//! assert!(diff.changed.is_empty());
//! ```
//!
//! Resolve dependencies against a registry and produce a lockfile:
//!
//! ```rust,no_run
//! # async fn example() {
//! use loadsmith_core::{Dependency, VersionReq};
//! use loadsmith_manifest::resolve;
//! use loadsmith_registry::RegistrySet;
//!
//! let registries = RegistrySet::new();
//! let deps = vec![Dependency::new("Author-Package", VersionReq::STAR, "thunderstore")];
//! let lockfile = resolve(deps, ®istries, None).await.unwrap();
//! # }
//! ```
pub use ;
pub use download_and_extract;
pub use ;
pub use ;
pub use resolve;
pub use ;
pub use ;