scoop_rs/lib.rs
1#![allow(unused)]
2//! This crate aims to provide a full-featured, practical, and efficient Rust
3//! reimplementation of [Scoop], the Windows command-line installer. It is a
4//! library crate providing the core functionality of interacting with Scoop,
5//! and is not intended to be used directly by end users. Developers who wish
6//! to implement a Scoop frontend or make use of Scoop's functionality in their
7//! own applications may use this crate. For end users, they may take a glance
8//! at [bagger], a reference implementation built on top of this crate, which
9//! provides a command-line interface similar to Scoop.
10//!
11//! # Overview
12//!
13//! The primary type in this crate is a [`Session`], which is an entry point to
14//! this crate. A session instance is basically a handle to the global state of
15//! scoop_rs. Most of the functions exposed by this crate take a session as
16//! their first argument.
17//!
18//! ## Examples
19//!
20//! Initialize a Scoop session, get the configuration associated with the
21//! session, and print the root path of Scoop to stdout:
22//!
23//! ```rust
24//! use scoop_rs::Session;
25//! let session = Session::new();
26//! let config = session.config();
27//! println!("{}", config.root_path().display());
28//! ```
29//!
30//! [Scoop]: https://scoop.sh/
31//! [bagger]: https://github.com/vincentmathis/bagger
32#[macro_use]
33extern crate serde;
34
35mod bucket;
36mod cache;
37pub mod complete;
38mod config;
39mod constant;
40pub mod diagnostic;
41mod env;
42mod error;
43mod event;
44mod internal;
45mod manifest_cache;
46mod package;
47mod persist;
48mod psmodule;
49mod session;
50mod shim;
51mod shortcut;
52#[cfg(test)]
53pub(crate) mod test_support;
54
55pub mod arch;
56pub mod operation;
57
58pub use error::Error;
59pub use event::Event;
60pub use internal::fs::{remove_symlink, symlink_dir};
61pub use internal::os::running_apps as running_apps_under;
62pub use package::{has_install_metadata, install_info_path, installed_manifest_path};
63pub use package::{Package, QueryOption, SyncOption, Transaction};
64pub use persist::unlink_links as persist_unlink_links;
65pub use session::Session;
66pub use shim::refresh as shim_refresh;
67pub use shim::target_of as shim_target_of;