Skip to main content

Crate scoop_rs

Crate scoop_rs 

Source
Expand description

This crate aims to provide a full-featured, practical, and efficient Rust reimplementation of Scoop, the Windows command-line installer. It is a library crate providing the core functionality of interacting with Scoop, and is not intended to be used directly by end users. Developers who wish to implement a Scoop frontend or make use of Scoop’s functionality in their own applications may use this crate. For end users, they may take a glance at bagger, a reference implementation built on top of this crate, which provides a command-line interface similar to Scoop.

§Overview

The primary type in this crate is a Session, which is an entry point to this crate. A session instance is basically a handle to the global state of scoop_rs. Most of the functions exposed by this crate take a session as their first argument.

§Examples

Initialize a Scoop session, get the configuration associated with the session, and print the root path of Scoop to stdout:

use scoop_rs::Session;
let session = Session::new();
let config = session.config();
println!("{}", config.root_path().display());

Modules§

arch
Runtime CPU architecture selection.
complete
Name providers for shell completion.
diagnostic
System diagnostics for checkup, mirroring upstream lib/diagnostic.ps1.
operation
Operations that can be performed on a Scoop instance.

Structs§

Package
A Scoop package.
Session
A handle representing a Scoop session.
Transaction
Transaction of sync operation.

Enums§

Error
Error that may occur during the lifetime of a Session.
Event
Event that may be emitted during the execution of operations.
QueryOption
Options that may be used to query Scoop packages.
SyncOption
Options that may be used to tweak behavior of package sync operation.

Functions§

has_install_metadata
Whether a version directory carries install metadata under either naming scheme.
install_info_path
Install info path inside a version directory, preferring upstream’s scoop-install.json with fallback to the legacy name.
installed_manifest_path
Installed manifest path inside a version directory, preferring upstream’s scoop-manifest.json with fallback to the legacy name.
persist_unlink_links
Remove persist links inside an app version directory.
remove_symlink
Remove a symlink at lnk.
running_apps_under
shim_refresh
Repair executable shims for all installed apps.
shim_target_of
Extract the target path referenced by a shim file, if any.
symlink_dir
Create a directory symlink at lnk pointing to src.