pub struct Engines { /* private fields */ }Implementations§
Source§impl Engines
impl Engines
Sourcepub fn new(home: &Path) -> Result<Arc<Self>, String>
pub fn new(home: &Path) -> Result<Arc<Self>, String>
The real network, tar and uv, for home’s engines folder.
Sourcepub fn with(
root: PathBuf,
fetch: Arc<dyn Fetch>,
run: Arc<dyn Run>,
platform: (&'static str, &'static str),
existing_comfyui: Option<PathBuf>,
default_port: u16,
) -> Self
pub fn with( root: PathBuf, fetch: Arc<dyn Fetch>, run: Arc<dyn Run>, platform: (&'static str, &'static str), existing_comfyui: Option<PathBuf>, default_port: u16, ) -> Self
Everything injected; for tests.
pub fn root(&self) -> &Path
Sourcepub fn supported(&self, engine: Engine) -> bool
pub fn supported(&self, engine: Engine) -> bool
Whether this machine can run engine from a managed install.
Sourcepub fn managed_mlx_audio_server(&self) -> Option<PathBuf>
pub fn managed_mlx_audio_server(&self) -> Option<PathBuf>
RigSpark’s own mlx_audio.server, once installed.
Sourcepub fn comfyui_install(&self) -> Option<ComfyInstall>
pub fn comfyui_install(&self) -> Option<ComfyInstall>
The ComfyUI to use: RigSpark’s own first, then the user’s folder if it has a Python.
Sourcepub fn comfyui_dir(&self) -> Option<PathBuf>
pub fn comfyui_dir(&self) -> Option<PathBuf>
A ComfyUI folder for weights even when it can’t be started by RigSpark (a user who runs ComfyUI themselves, perhaps with conda).
pub fn status(&self, engine: Engine, external_mlx_audio: bool) -> EngineView
Sourcepub fn install(
self: &Arc<Self>,
engine: Engine,
cancel: CancellationToken,
) -> Result<(), String>
pub fn install( self: &Arc<Self>, engine: Engine, cancel: CancellationToken, ) -> Result<(), String>
Starts installing engine in the background. Refuses a second install of the same
engine while one runs.
Sourcepub async fn install_now(
&self,
engine: Engine,
cancel: &CancellationToken,
) -> Result<(), String>
pub async fn install_now( &self, engine: Engine, cancel: &CancellationToken, ) -> Result<(), String>
Runs every step; the installed marker is written only after all of them succeed.
Sourcepub async fn ensure_comfyui(
&self,
cancel: &CancellationToken,
) -> Result<ComfyEndpoint, String>
pub async fn ensure_comfyui( &self, cancel: &CancellationToken, ) -> Result<ComfyEndpoint, String>
A ComfyUI to generate with, starting one if none answers. Reuses the one RigSpark started earlier while it is alive.
Auto Trait Implementations§
impl !Freeze for Engines
impl !RefUnwindSafe for Engines
impl !UnwindSafe for Engines
impl Forget for Engines
impl Send for Engines
impl Sync for Engines
impl Unpin for Engines
impl UnsafeUnpin for Engines
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
Mutably borrows from an owned value. Read more