pub struct Dep {
pub git: String,
pub tag: Option<String>,
pub rev: Option<String>,
pub branch: Option<String>,
pub entry: Option<PathBuf>,
pub target_dir: Option<PathBuf>,
pub patch_dir: Option<PathBuf>,
pub patch_drift: Option<PatchDrift>,
}Expand description
A git-based dependency declared in [deps].
At most one of tag, rev, or branch may be set. All three being
absent is accepted at parse time (treated as HEAD resolution); hard
enforcement is deferred to the fetcher.
Fields§
§git: StringRemote git URL (required).
tag: Option<String>Pin to a specific tag. Mutually exclusive with rev and branch.
rev: Option<String>Pin to a specific commit SHA. Mutually exclusive with tag and branch.
branch: Option<String>Track a branch (non-reproducible). Mutually exclusive with tag and rev.
entry: Option<PathBuf>Override the Lua require entry root for this dependency.
Takes precedence over the author’s own [package].entry.
When absent, the author’s entry (or the fallback chain) applies.
target_dir: Option<PathBuf>Vendor target directory relative to the consumer’s manifest.
When set, mlua-pkg install physically copies the resolved package
root into this directory (versionable in the consumer’s git tree)
instead of creating a .mlua-pkgs/vendored/<name> symlink. The
require root inside the copy is <target_dir>/<entry>.
patch_dir: Option<PathBuf>Locally patched copy of the package root, relative to the consumer’s
manifest (e.g. "patches/foo").
mlua-pkg patch <name> creates it from the pinned upstream and records
the base commit as patch_base in the lockfile. install resolves
the package from this directory for as long as the pin still resolves
to that base; when the pin moves, the upstream is used instead, the
directory is left untouched, and a warning names both commits.
patch_drift: Option<PatchDrift>What install does when patch_dir cannot be used (the pin moved
away from patch_base, the directory is missing, or no base is
recorded). Absent means PatchDrift::Warn.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dep
impl<'de> Deserialize<'de> for Dep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Dep
impl StructuralPartialEq for Dep
Auto Trait Implementations§
impl Freeze for Dep
impl RefUnwindSafe for Dep
impl Send for Dep
impl Sync for Dep
impl Unpin for Dep
impl UnsafeUnpin for Dep
impl UnwindSafe for Dep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more