pub struct LlamaCppInstaller { /* private fields */ }Expand description
The llama.cpp installer.
Implementations§
Source§impl LlamaCppInstaller
impl LlamaCppInstaller
Sourcepub fn new(config: LlamaCppConfig) -> Self
pub fn new(config: LlamaCppConfig) -> Self
Create a new installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn build_dir_path(&self) -> &str
pub fn build_dir_path(&self) -> &str
The directory the source is cloned + built into (also a verification model search root while it still exists).
Sourcepub fn dependencies(&self) -> &[&str]
pub fn dependencies(&self) -> &[&str]
Get the list of required dependencies.
llama.cpp depends on ROCm.
Sourcepub fn check_latest_release(&self) -> Option<ReleaseManifest>
pub fn check_latest_release(&self) -> Option<ReleaseManifest>
Fetch the latest release manifest from GitHub.
Returns None for HTTP/API failures, including 404.
pub fn release_asset_for_arch<'a>( &self, manifest: &'a ReleaseManifest, gpu_arch: &str, ) -> Option<&'a ReleaseAsset>
Sourcepub fn validate_repo_access(&self) -> Result<(), String>
pub fn validate_repo_access(&self) -> Result<(), String>
Validate the git clone step for private repo access.
Returns Ok(()) if the repo is accessible (public or private with valid auth).
Returns Err(String) with an actionable error message if auth fails.
Sourcepub fn cmake_flags(&self) -> Vec<String>
pub fn cmake_flags(&self) -> Vec<String>
Build the CMake flags for the configured channel and GPU arch.
Returns a list of CMake cache variable flags.
Sourcepub fn build_commands(&self, home: &str) -> Vec<ShellCommand>
pub fn build_commands(&self, home: &str) -> Vec<ShellCommand>
Build the sequence of commands to install llama.cpp with ROCm support.
Sourcepub fn resolve_install_strategy(
&self,
home: &str,
manifest: Option<&ReleaseManifest>,
) -> InstallStrategy
pub fn resolve_install_strategy( &self, home: &str, manifest: Option<&ReleaseManifest>, ) -> InstallStrategy
Resolve the install strategy for the detected GPU and latest release manifest.
pub fn download_prebuilt_binary( &self, plan: &PrebuiltInstallPlan, ) -> Result<(), String>
Sourcepub fn purge_source_artifacts(
&self,
home: &str,
binary_placed: bool,
) -> Result<(), String>
pub fn purge_source_artifacts( &self, home: &str, binary_placed: bool, ) -> Result<(), String>
Purge source build artifacts after a successful install.
Removes repo metadata, git credential cache/store entries, and the build tree. Returns Ok(()) when the purge is already complete or if the binary was placed but a cleanup step fails. Returns Err when cleanup fails before installation has produced the binary.
Sourcepub fn build_commands_with_auth(
&self,
home: &str,
token: Option<SealedToken>,
) -> Vec<ShellCommand>
pub fn build_commands_with_auth( &self, home: &str, token: Option<SealedToken>, ) -> Vec<ShellCommand>
Build the sequence of commands to install llama.cpp with ROCm support, handling private repo auth.
pub fn install( &self, home: &str, manifest: Option<&ReleaseManifest>, ) -> Result<(), String>
pub fn run_source_install(&self, home: &str) -> Result<(), String>
Trait Implementations§
Source§impl Clone for LlamaCppInstaller
impl Clone for LlamaCppInstaller
Source§impl Debug for LlamaCppInstaller
impl Debug for LlamaCppInstaller
Auto Trait Implementations§
impl Freeze for LlamaCppInstaller
impl RefUnwindSafe for LlamaCppInstaller
impl Send for LlamaCppInstaller
impl Sync for LlamaCppInstaller
impl Unpin for LlamaCppInstaller
impl UnsafeUnpin for LlamaCppInstaller
impl UnwindSafe for LlamaCppInstaller
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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