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 upstreamlib/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.
- Query
Option - Options that may be used to query Scoop packages.
- Sync
Option - 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.jsonwith fallback to the legacy name. - installed_
manifest_ path - Installed manifest path inside a version directory, preferring
upstream’s
scoop-manifest.jsonwith 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
lnkpointing tosrc.