├── .gitignore ├── .github ├── FUNDING.yml ├── classawareness.png └── workflows │ └── rust.yml ├── contrib ├── screenshot.png ├── libredefender.desktop └── icon.svg ├── src ├── errors.rs ├── lib.rs ├── notify.rs ├── utils.rs ├── nice.rs ├── patterns.rs ├── args.rs ├── db.rs ├── config.rs ├── main.rs ├── scan.rs └── schedule.rs ├── PKGBUILD ├── Cargo.toml ├── README.md ├── tests └── lib.rs ├── LICENSE-GPL2 ├── LICENSE-GPL3 └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [kpcyrd] 2 | -------------------------------------------------------------------------------- /contrib/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpcyrd/libredefender/HEAD/contrib/screenshot.png -------------------------------------------------------------------------------- /.github/classawareness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpcyrd/libredefender/HEAD/.github/classawareness.png -------------------------------------------------------------------------------- /src/errors.rs: -------------------------------------------------------------------------------- 1 | pub use anyhow::{anyhow, bail, Context, Error, Result}; 2 | pub use log::{debug, error, info, trace, warn}; 3 | -------------------------------------------------------------------------------- /contrib/libredefender.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=LibreDefender 4 | Comment=An antivirus system 5 | Exec=/usr/bin/libredefender scheduler 6 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow( 2 | clippy::wildcard_imports, 3 | clippy::non_ascii_literal, 4 | clippy::missing_errors_doc, 5 | clippy::cast_sign_loss, 6 | clippy::cast_possible_truncation, 7 | clippy::module_name_repetitions 8 | )] 9 | 10 | pub mod args; 11 | pub mod config; 12 | pub mod db; 13 | pub mod errors; 14 | pub mod nice; 15 | pub mod notify; 16 | pub mod patterns; 17 | pub mod scan; 18 | pub mod schedule; 19 | pub mod utils; 20 | -------------------------------------------------------------------------------- /src/notify.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use notify_rust::{Hint, Notification, Timeout, Urgency}; 3 | use std::path::Path; 4 | use v_htmlescape::escape; 5 | 6 | pub fn show(path: &Path, detected_as: &str) -> Result<()> { 7 | let title = format!("Infection found: {:?}", detected_as); 8 | let body = format!("libredefender found an infected file:\n{:?}\nRun `libredefender infections -h` to take action.", path); 9 | Notification::new() 10 | .summary(&title) 11 | .body(&escape(&body).to_string()) 12 | .icon("libredefender") 13 | .urgency(Urgency::Critical) 14 | .hint(Hint::Resident(true)) // this is not supported by all implementations 15 | .timeout(Timeout::Never) // this however is 16 | .show()?; 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use std::fs; 3 | use std::io; 4 | use std::io::prelude::*; 5 | use std::path::Path; 6 | 7 | pub fn ask_confirmation(text: &str) -> Result { 8 | let mut stdout = io::stdout(); 9 | write!(stdout, "{} [y/N] ", text)?; 10 | stdout.flush()?; 11 | 12 | let mut input = String::new(); 13 | io::stdin().read_line(&mut input)?; 14 | 15 | let mut input = input.chars().next().context("Stdin was closed")?; 16 | 17 | input.make_ascii_lowercase(); 18 | Ok(input == 'y') 19 | } 20 | 21 | pub fn ensure_deleted(path: &Path) -> Result<()> { 22 | match fs::remove_file(path) { 23 | Ok(()) => (), 24 | Err(err) if err.kind() == io::ErrorKind::NotFound => (), 25 | err => err.with_context(|| anyhow!("Failed to delete {:?}", path))?, 26 | } 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /src/nice.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use ioprio::Pid; 3 | 4 | pub fn setup() -> Result<()> { 5 | if let Err(err) = ionice() { 6 | warn!("{}", err); 7 | } 8 | if let Err(err) = nice() { 9 | warn!("{}", err); 10 | } 11 | Ok(()) 12 | } 13 | 14 | pub fn nice() -> Result<()> { 15 | debug!("Calling nice(2) for idle priority"); 16 | let err = unsafe { libc::nice(19) }; 17 | if err == -1 { 18 | bail!("Failed to set process priority"); 19 | } 20 | Ok(()) 21 | } 22 | 23 | pub fn ionice() -> Result<()> { 24 | let target = ioprio::Target::ProcessGroup(Pid::from_raw(0)); 25 | let priority = ioprio::Priority::new(ioprio::Class::Idle); 26 | debug!("Calling ioprio_set for idle priority"); 27 | ioprio::set_priority(target, priority).context("Failed to ionice process group")?; 28 | Ok(()) 29 | } 30 | -------------------------------------------------------------------------------- /contrib/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: kpcyrd 2 | 3 | pkgname=libredefender 4 | pkgver=0.0.0 5 | pkgrel=1 6 | pkgdesc='Light-weight antivirus scanner for Linux' 7 | url='https://github.com/kpcyrd/libredefender' 8 | arch=('x86_64') 9 | license=('GPL3') 10 | depends=('clamav') 11 | makedepends=('cargo' 'clang') 12 | #backup=('etc/libredefender.conf') 13 | 14 | build() { 15 | cd .. 16 | cargo build --release --locked 17 | } 18 | 19 | package() { 20 | cd .. 21 | 22 | install -Dm 755 -t "${pkgdir}/usr/bin" \ 23 | target/release/libredefender 24 | 25 | # install completions 26 | install -d "${pkgdir}/usr/share/bash-completion/completions" \ 27 | "${pkgdir}/usr/share/zsh/site-functions" \ 28 | "${pkgdir}/usr/share/fish/vendor_completions.d" 29 | "${pkgdir}/usr/bin/libredefender" completions bash > "${pkgdir}/usr/share/bash-completion/completions/libredefender" 30 | "${pkgdir}/usr/bin/libredefender" completions zsh > "${pkgdir}/usr/share/zsh/site-functions/_libredefender" 31 | "${pkgdir}/usr/bin/libredefender" completions fish > "${pkgdir}/usr/share/fish/vendor_completions.d/libredefender.fish" 32 | 33 | install -Dm 644 contrib/libredefender.desktop -t "${pkgdir}/etc/xdg/autostart" 34 | install -Dm 644 contrib/icon.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" 35 | } 36 | 37 | # vim: ts=2 sw=2 et: 38 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libredefender" 3 | version = "0.7.0" 4 | description = "Light-weight antivirus scanner for Linux" 5 | authors = ["kpcyrd "] 6 | license = "GPL-2.0 OR GPL-3.0" 7 | repository = "https://github.com/kpcyrd/libredefender" 8 | categories = ["command-line-utilities"] 9 | readme = "README.md" 10 | edition = "2018" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | anyhow = "1.0.40" 16 | atoi = "2" 17 | chrono = { version = "0.4.19", features = ["serde"] } 18 | chrono-humanize = "0.2.1" 19 | clamav-rs = { git = "https://github.com/kpcyrd/clamav-rs", branch = "clamav-1.2" } 20 | clap = { version = "4.0.32", features = ["derive"] } 21 | clap_complete = "4.0.7" 22 | colored = "2.0.0" 23 | config = { version = "0.13", default-features = false, features = ["toml"] } 24 | crossbeam-channel = "0.5.1" 25 | dirs = "5" 26 | env_logger = "0.10" 27 | glob = "0.3.0" 28 | human-size = "0.4.1" 29 | ioprio = "0.2" 30 | libc = "0.2.94" 31 | log = "0.4.14" 32 | memchr = "2.4.0" 33 | notify-rust = "4.5.2" 34 | num-format = "0.4.0" 35 | num_cpus = "1.13.0" 36 | rand = "0.8.3" 37 | serde = { version = "1.0.125", features = ["derive"] } 38 | serde_json = "1.0.64" 39 | starship-battery = "0.7.9" 40 | v_htmlescape = "0.15" 41 | walkdir = "2.3.2" 42 | 43 | [dev-dependencies] 44 | tempfile = "3" 45 | -------------------------------------------------------------------------------- /src/patterns.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; 3 | use std::fmt; 4 | use std::path::Path; 5 | use std::str::FromStr; 6 | 7 | #[derive(Debug)] 8 | pub struct Pattern(glob::Pattern); 9 | 10 | impl Pattern { 11 | #[inline] 12 | #[must_use] 13 | pub fn matches(&self, path: &Path) -> bool { 14 | self.0.matches_path(path) 15 | } 16 | } 17 | 18 | impl fmt::Display for Pattern { 19 | #[inline] 20 | fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result { 21 | self.0.fmt(w) 22 | } 23 | } 24 | 25 | impl FromStr for Pattern { 26 | type Err = Error; 27 | 28 | fn from_str(s: &str) -> Result { 29 | let pattern = glob::Pattern::from_str(s)?; 30 | Ok(Pattern(pattern)) 31 | } 32 | } 33 | 34 | impl Serialize for Pattern { 35 | fn serialize(&self, serializer: S) -> Result 36 | where 37 | S: Serializer, 38 | { 39 | let pattern = self.0.to_string(); 40 | serializer.serialize_str(&pattern) 41 | } 42 | } 43 | 44 | impl<'de> Deserialize<'de> for Pattern { 45 | fn deserialize(deserializer: D) -> Result 46 | where 47 | D: Deserializer<'de>, 48 | { 49 | let s = String::deserialize(deserializer)?; 50 | FromStr::from_str(&s).map_err(de::Error::custom) 51 | } 52 | } 53 | 54 | #[cfg(test)] 55 | mod tests { 56 | use super::*; 57 | 58 | #[test] 59 | fn test_serialize_glob() { 60 | let txt = "foo/**/{a,b}*"; 61 | let p = Pattern::from_str(txt).unwrap(); 62 | let json = serde_json::to_string(&p).unwrap(); 63 | assert_eq!(json, "\"foo/**/{a,b}*\""); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | name: build 12 | runs-on: ${{ matrix.os }} 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | os: [ubuntu-latest] 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Install dependencies 20 | run: | 21 | sudo apt-get update 22 | sudo apt-get install libclamav-dev 23 | - name: Build 24 | run: cargo build --verbose 25 | - name: Run tests 26 | run: cargo test --verbose 27 | 28 | integration: 29 | name: integration 30 | runs-on: ${{ matrix.os }} 31 | strategy: 32 | fail-fast: false 33 | matrix: 34 | os: [ubuntu-latest] 35 | steps: 36 | - uses: actions/checkout@v2 37 | - name: Install dependencies 38 | run: | 39 | sudo apt-get update 40 | sudo apt-get install libclamav-dev clamav-freshclam 41 | - name: Disable apparmor 42 | run: sudo apparmor_parser -R /etc/apparmor.d/usr.bin.freshclam 43 | - name: Fetch database 44 | run: freshclam -F --datadir=$PWD/tmp -l $PWD/tmp/freshclam.log 45 | - name: Run tests 46 | run: CLAMAV_PATH=$PWD/tmp cargo test -- --nocapture --ignored 47 | 48 | clippy: 49 | name: clippy 50 | runs-on: ubuntu-latest 51 | steps: 52 | - uses: actions/checkout@v2 53 | - uses: actions-rs/toolchain@v1 54 | with: 55 | profile: minimal 56 | toolchain: stable 57 | override: true 58 | components: clippy 59 | - name: Install dependencies 60 | run: | 61 | sudo apt-get update 62 | sudo apt-get install libclamav-dev 63 | - uses: actions-rs/cargo@v1 64 | with: 65 | command: clippy 66 | args: --workspace --all-targets -- --deny warnings 67 | 68 | fmt: 69 | name: fmt 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v2 73 | - name: Run cargo fmt 74 | run: cargo fmt -- --check 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # libredefender 2 | 3 | Imagine the information security compliance guideline says you need an antivirus but you run Arch Linux. 4 | 5 |

Screenshot showing a libredefender status report

6 | 7 | libredefender is an antivirus program featuring: 8 | 9 | - **Industry standards** - Scanning is implemented with libclamav 10 | - **Signatures** - Yes 11 | - **Scheduling** - Starts scans periodically so you don't have to 12 | - **Checkmarks** - ✅ Extra green ✅ 13 | 14 | The process is trying to change both io and processor priority to idle. 15 | 16 | `clamav-freshclam.service` needs to be setup. 17 | 18 | ## Example config 19 | 20 | The configuration file is loaded from **~/.config/libredefender.toml**: 21 | 22 | ```toml 23 | [scan] 24 | excludes = [ 25 | # rust build folders 26 | "/home/user/repos/**/target", 27 | ] 28 | ## by default libredefender spawns one thread per cpu core 29 | ## set to 1 to use a single thread 30 | #concurrency = 1 31 | skip_hidden = true 32 | skip_larger_than = "30MiB" 33 | 34 | [update] 35 | ## use data fetched by clamav-freshclam.service (default) 36 | path = "/var/lib/clamav" 37 | 38 | [schedule] 39 | preferred_hours = "09:00:00-19:00:00" 40 | ## Do not run scans when on battery 41 | skip_on_battery = true 42 | ``` 43 | 44 | ## Installation 45 | 46 | Packaging status 47 | 48 | pacman -S libredefender 49 | 50 | ## Icons 51 | 52 | Icons made by [Smashicons](https://www.flaticon.com/authors/smashicons) from [www.flaticon.com](https://www.flaticon.com/). 53 | 54 | ## License 55 | 56 | This code is dual-licensed as `GPLv2 OR GPLv3+`. libclamav is currently likely to be considered GPLv2-only, so the final binary is going to be GPLv2. If the need for GPLv2 is resolved we're likely going to drop GPLv2 compatibility. 57 | 58 | Note that both licenses have a "No warranty" clause. 59 | 60 | [![](.github/classawareness.png)](.github/classawareness.png) 61 | -------------------------------------------------------------------------------- /src/args.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use clap::{ArgAction, CommandFactory, Parser}; 3 | use clap_complete::Shell; 4 | use std::io::stdout; 5 | use std::path::PathBuf; 6 | 7 | #[derive(Parser)] 8 | pub struct Args { 9 | /// Only show warnings 10 | #[clap(short, long, global = true)] 11 | pub quiet: bool, 12 | /// More verbose logs 13 | #[clap(short, long, global = true, action = ArgAction::Count)] 14 | pub verbose: u8, 15 | #[clap(short = 'C', long, global = true)] 16 | pub colors: bool, 17 | #[clap(short = 'D', long, global = true)] 18 | pub data: Option, 19 | #[clap(subcommand)] 20 | pub subcommand: Option, 21 | } 22 | 23 | #[derive(Parser)] 24 | pub enum SubCommand { 25 | /// Scan directories for signature matches 26 | Scan(Scan), 27 | /// Run a background service that scans periodically 28 | Scheduler(Scheduler), 29 | /// List threats that have been detected 30 | Infections(Infections), 31 | /// Send a test notification 32 | TestNotify, 33 | /// Load the configuration and print it as json for debugging 34 | DumpConfig, 35 | /// Generate shell completions 36 | Completions(Completions), 37 | } 38 | 39 | #[derive(Parser, Default)] 40 | pub struct Scan { 41 | /// Paths that should be scanned 42 | pub paths: Vec, 43 | /// Configure the number of scanning threads, defaults to number of cpu cores 44 | #[clap(short = 'j', long)] 45 | pub concurrency: Option, 46 | } 47 | 48 | #[derive(Parser)] 49 | pub struct Scheduler {} 50 | 51 | #[derive(Parser)] 52 | pub struct Infections { 53 | /// Interactively offer deletion for every file 54 | #[clap(short, long, group = "action")] 55 | pub delete: bool, 56 | /// Delete all files without further confirmation (DANGER!) 57 | #[clap(long, group = "action")] 58 | pub delete_all: bool, 59 | } 60 | 61 | #[derive(Debug, Clone, Parser)] 62 | pub struct Completions { 63 | pub shell: Shell, 64 | } 65 | 66 | impl Completions { 67 | pub fn gen_completions(&self) -> Result<()> { 68 | clap_complete::generate( 69 | self.shell, 70 | &mut Args::command(), 71 | "libredefender", 72 | &mut stdout(), 73 | ); 74 | Ok(()) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/db.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use chrono::{DateTime, Utc}; 3 | use serde::{Deserialize, Serialize}; 4 | use std::collections::HashMap; 5 | use std::fs; 6 | use std::path::PathBuf; 7 | 8 | pub struct Database { 9 | path: PathBuf, 10 | data: Data, 11 | } 12 | 13 | impl Database { 14 | pub fn path() -> Result { 15 | let data_dir = dirs::data_dir().context("Failed to find data directory")?; 16 | let path = data_dir.join("libredefender.db"); 17 | Ok(path) 18 | } 19 | 20 | pub fn load() -> Result { 21 | let path = Self::path()?; 22 | if let Some(db) = Self::load_from(path.clone()) { 23 | Ok(db) 24 | } else { 25 | Ok(Database { 26 | path, 27 | data: Data::default(), 28 | }) 29 | } 30 | } 31 | 32 | pub fn load_from(path: PathBuf) -> Option { 33 | if path.exists() { 34 | match Self::load_from_existing(path) { 35 | Ok(db) => Some(db), 36 | Err(err) => { 37 | warn!("Failed to open existing database, using new one: {:#}", err); 38 | None 39 | } 40 | } 41 | } else { 42 | None 43 | } 44 | } 45 | 46 | pub fn load_from_existing(path: PathBuf) -> Result { 47 | let buf = fs::read(&path).context("Failed to open database")?; 48 | let data = serde_json::from_slice(&buf).context("Failed to read database")?; 49 | Ok(Database { path, data }) 50 | } 51 | 52 | pub fn store(&self) -> Result<()> { 53 | if let Some(parent) = self.path.parent() { 54 | fs::create_dir_all(parent).context("Failed to create database directory")?; 55 | } 56 | let buf = serde_json::to_vec(&self.data)?; 57 | fs::write(&self.path, buf).context("Failed to write database")?; 58 | debug!("Wrote database to {}", self.path.display()); 59 | Ok(()) 60 | } 61 | 62 | #[must_use] 63 | pub fn data(&self) -> &Data { 64 | &self.data 65 | } 66 | 67 | #[must_use] 68 | pub fn data_mut(&mut self) -> &mut Data { 69 | &mut self.data 70 | } 71 | } 72 | 73 | #[derive(Debug, Default, Serialize, Deserialize)] 74 | pub struct Data { 75 | pub last_scan: Option>, 76 | pub threats: HashMap>, 77 | pub signature_count: usize, 78 | pub signatures_age: Option>, 79 | } 80 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use crate::args; 2 | use crate::errors::*; 3 | use crate::patterns::Pattern; 4 | use crate::schedule::PreferedHours; 5 | use human_size::{Byte, Size, SpecificSize}; 6 | use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; 7 | use std::path::{Path, PathBuf}; 8 | use std::str::FromStr; 9 | 10 | #[derive(Debug, Serialize, Deserialize)] 11 | pub struct Config { 12 | #[serde(default)] 13 | pub scan: ScanConfig, 14 | pub update: UpdateConfig, 15 | #[serde(default)] 16 | pub schedule: ScheduleConfig, 17 | } 18 | 19 | #[derive(Debug, Default, Serialize, Deserialize)] 20 | pub struct ScanConfig { 21 | #[serde(default)] 22 | pub paths: Vec, 23 | pub concurrency: Option, 24 | #[serde(default)] 25 | pub excludes: Vec, 26 | #[serde(default)] 27 | pub skip_hidden: bool, 28 | pub skip_larger_than: Option, 29 | } 30 | 31 | #[derive(Debug, Serialize, Deserialize)] 32 | pub struct UpdateConfig { 33 | pub path: PathBuf, 34 | } 35 | 36 | #[derive(Debug, Default, Serialize, Deserialize)] 37 | pub struct ScheduleConfig { 38 | pub automatic_scans: Option, 39 | pub preferred_hours: Option, 40 | #[serde(default)] 41 | pub skip_on_battery: bool, 42 | } 43 | 44 | // config::File::new expects &str instead of &Path 45 | fn path_to_string(path: &Path) -> Result { 46 | let s = path.to_str().context("Path contains invalid utf-8")?; 47 | Ok(s.to_string()) 48 | } 49 | 50 | pub fn load(args: Option<&args::Scan>) -> Result { 51 | let mut settings = config::Config::builder().set_default("update.path", "/var/lib/clamav")?; 52 | 53 | let config_dir = dirs::config_dir().context("Failed to find config dir")?; 54 | let path = path_to_string(&config_dir.join("libredefender.toml"))?; 55 | settings = 56 | settings.add_source(config::File::new(&path, config::FileFormat::Toml).required(false)); 57 | 58 | if let Some(args) = args { 59 | if let Some(concurrency) = args.concurrency { 60 | settings = settings.set_override("scan.concurrency", concurrency as i64)?; 61 | } 62 | } 63 | 64 | let settings = settings.build().context("Failed to load configuration")?; 65 | 66 | let config = settings 67 | .try_deserialize::() 68 | .context("Failed to parse config")?; 69 | 70 | Ok(config) 71 | } 72 | 73 | #[derive(Debug)] 74 | pub struct HumanSize(SpecificSize); 75 | 76 | impl HumanSize { 77 | #[must_use] 78 | pub fn as_bytes(&self) -> u64 { 79 | self.0.into::().value() as u64 80 | } 81 | } 82 | 83 | impl FromStr for HumanSize { 84 | type Err = Error; 85 | 86 | fn from_str(s: &str) -> Result { 87 | let size: Size = s.parse().context("Failed to parse human size")?; 88 | Ok(HumanSize(size)) 89 | } 90 | } 91 | 92 | impl Serialize for HumanSize { 93 | fn serialize(&self, serializer: S) -> Result 94 | where 95 | S: Serializer, 96 | { 97 | let bytes = self.0.to_bytes(); 98 | serializer.serialize_str(&bytes.to_string()) 99 | } 100 | } 101 | 102 | impl<'de> Deserialize<'de> for HumanSize { 103 | fn deserialize(deserializer: D) -> Result 104 | where 105 | D: Deserializer<'de>, 106 | { 107 | let s = String::deserialize(deserializer)?; 108 | FromStr::from_str(&s).map_err(de::Error::custom) 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![allow( 2 | clippy::wildcard_imports, 3 | clippy::non_ascii_literal, 4 | clippy::missing_errors_doc 5 | )] 6 | 7 | use chrono::{DateTime, Local, Utc}; 8 | use chrono_humanize::HumanTime; 9 | use clap::Parser; 10 | use colored::{Color, ColoredString, Colorize}; 11 | use env_logger::Env; 12 | use libredefender::args::{Args, SubCommand}; 13 | use libredefender::config; 14 | use libredefender::db::Database; 15 | use libredefender::errors::*; 16 | use libredefender::nice; 17 | use libredefender::notify; 18 | use libredefender::scan; 19 | use libredefender::schedule; 20 | use libredefender::utils; 21 | use num_format::{Locale, ToFormattedString}; 22 | use std::borrow::Cow; 23 | use std::path::Path; 24 | 25 | fn format_num(num: usize, zero_is_bad: bool) -> ColoredString { 26 | let color = if zero_is_bad ^ (num != 0) { 27 | Color::Red 28 | } else { 29 | Color::Green 30 | }; 31 | num.to_formatted_string(&Locale::en).color(color).bold() 32 | } 33 | 34 | fn format_datetime(dt: &Option>) -> Cow<'_, str> { 35 | if let Some(dt) = dt { 36 | let elapsed_since = dt.signed_duration_since(Utc::now()); 37 | Cow::Owned(format!( 38 | "{} {}", 39 | dt.with_timezone(&Local).format("%Y-%m-%d %H:%M:%S %Z"), 40 | format!("({})", HumanTime::from(elapsed_since)).bold() 41 | )) 42 | } else { 43 | Cow::Borrowed("-") 44 | } 45 | } 46 | 47 | fn print_line(line: &str, good: bool) { 48 | if good { 49 | println!(" ✅ {}", line); 50 | } else { 51 | println!(" ❌ {}", line); 52 | } 53 | } 54 | 55 | fn main() -> Result<()> { 56 | let args = Args::parse(); 57 | 58 | let logging = match (args.quiet, args.verbose) { 59 | (true, _) => "warn", 60 | (false, 0) => "info", 61 | (false, 1) => "info,libredefender=debug", 62 | (false, 2) => "debug", 63 | (false, _) => "debug,libredefender=trace", 64 | }; 65 | env_logger::init_from_env(Env::default().default_filter_or(logging)); 66 | 67 | if args.colors { 68 | colored::control::set_override(true); 69 | } 70 | 71 | match args.subcommand { 72 | None => { 73 | let db = Database::load().context("Failed to load database")?; 74 | let data = db.data(); 75 | 76 | print_line( 77 | &format!( 78 | "Last scan {}", 79 | format_datetime(&data.last_scan) 80 | ), 81 | data.last_scan.is_some(), 82 | ); 83 | print_line( 84 | &format!( 85 | "Threats present {}", 86 | format_num(data.threats.len(), false) 87 | ), 88 | data.threats.is_empty(), 89 | ); 90 | 91 | print_line( 92 | &format!( 93 | "Signatures {}", 94 | format_num(data.signature_count, true) 95 | ), 96 | data.signature_count > 0, 97 | ); 98 | print_line( 99 | &format!( 100 | "Signatures updated {}", 101 | format_datetime(&data.signatures_age) 102 | ), 103 | data.signatures_age.is_some(), 104 | ); 105 | 106 | println!(); 107 | println!( 108 | "{}", 109 | "Start a scan with `libredefender scan` or run `libredefender help`".green() 110 | ); 111 | } 112 | Some(SubCommand::Scan(args)) => { 113 | nice::setup()?; 114 | scan::init()?; 115 | scan::run(args)?; 116 | } 117 | Some(SubCommand::Scheduler(args)) => { 118 | nice::setup()?; 119 | scan::init()?; 120 | schedule::run(&args)?; 121 | } 122 | Some(SubCommand::Infections(args)) => { 123 | let mut db = Database::load().context("Failed to load database")?; 124 | let data = db.data_mut(); 125 | 126 | let mut deleted = Vec::new(); 127 | 128 | for (path, names) in &data.threats { 129 | if args.delete || args.delete_all { 130 | let should_delete = if args.delete_all { 131 | true 132 | } else { 133 | utils::ask_confirmation(&format!("Delete {:?} at {:?}", names, path))? 134 | }; 135 | 136 | if should_delete { 137 | info!("Deleting {:?} at {:?}", names, path); 138 | if let Err(err) = utils::ensure_deleted(path) { 139 | error!("Failed to delete {:?}: {:#}", path, err); 140 | } else { 141 | deleted.push(path.clone()); 142 | } 143 | } 144 | } else { 145 | for name in names { 146 | println!( 147 | "{} => {}", 148 | name.red().bold(), 149 | format!("{:?}", path).yellow(), 150 | ); 151 | } 152 | } 153 | } 154 | 155 | if !deleted.is_empty() { 156 | for path in deleted { 157 | data.threats.remove(&path); 158 | } 159 | db.store().context("Failed to write database")?; 160 | } 161 | } 162 | Some(SubCommand::TestNotify) => notify::show(Path::new("/just/a/test"), "just/testing")?, 163 | Some(SubCommand::DumpConfig) => { 164 | let config = config::load(None).context("Failed to load config")?; 165 | 166 | serde_json::to_writer_pretty(std::io::stdout(), &config)?; 167 | println!(); 168 | } 169 | Some(SubCommand::Completions(args)) => args.gen_completions()?, 170 | } 171 | 172 | Ok(()) 173 | } 174 | -------------------------------------------------------------------------------- /tests/lib.rs: -------------------------------------------------------------------------------- 1 | use crossbeam_channel::Receiver; 2 | use env_logger::Env; 3 | use libredefender::config::ScanConfig; 4 | use libredefender::errors::*; 5 | use libredefender::patterns::Pattern; 6 | use libredefender::scan; 7 | use libredefender::scan::Scanner; 8 | use std::env; 9 | use std::fs; 10 | use std::mem; 11 | use std::os::unix::fs::PermissionsExt; 12 | use std::path::Path; 13 | use std::path::PathBuf; 14 | use std::str::FromStr; 15 | use std::sync::Arc; 16 | use walkdir::DirEntry; 17 | 18 | const EICAR: &str = "X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"; 19 | 20 | fn init() { 21 | let _ = env_logger::Builder::from_env(Env::default().default_filter_or("info")) 22 | .is_test(true) 23 | .try_init(); 24 | } 25 | 26 | fn clamav_dir() -> PathBuf { 27 | let path = env::var("CLAMAV_PATH").unwrap_or_else(|_| "/var/lib/clamav".to_string()); 28 | PathBuf::from(path) 29 | } 30 | 31 | fn run_scan(cfg: &ScanConfig, path: &Path) -> Receiver<(PathBuf, String)> { 32 | let (results_tx, results_rx) = crossbeam_channel::unbounded(); 33 | let (fs_tx, fs_rx) = crossbeam_channel::bounded::(128); 34 | 35 | let scanner = Scanner::new(&clamav_dir()).unwrap(); 36 | let scanner = Arc::new(scanner); 37 | 38 | scan::ingest_directory(cfg, &fs_tx, path); 39 | mem::drop(fs_tx); 40 | 41 | for entry in fs_rx { 42 | if let Err(err) = scanner.scan_file(entry.path(), &results_tx) { 43 | error!("{:#}", err); 44 | } 45 | } 46 | results_rx 47 | } 48 | 49 | #[test] 50 | #[ignore] 51 | fn test_find_threat() { 52 | init(); 53 | 54 | let tmp_dir = tempfile::tempdir().unwrap(); 55 | 56 | let eicar_file_path = tmp_dir.path().join("eicar.txt"); 57 | fs::write(eicar_file_path, EICAR).unwrap(); 58 | 59 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 60 | 61 | let (_path, res) = results_rx.recv().unwrap(); 62 | assert_eq!(res, "Win.Test.EICAR_HDB-1"); 63 | 64 | assert!(results_rx.recv().is_err()); 65 | } 66 | 67 | #[test] 68 | #[ignore] 69 | fn test_find_no_threat() { 70 | init(); 71 | 72 | let tmp_dir = tempfile::tempdir().unwrap(); 73 | 74 | let eicar_file_path = tmp_dir.path().join("eicar.txt"); 75 | fs::write(eicar_file_path, "heeeello i am no virus, i swear!").unwrap(); 76 | 77 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 78 | 79 | assert!(results_rx.recv().is_err()); 80 | } 81 | 82 | #[test] 83 | #[ignore] 84 | fn test_find_no_threat_multiple_files() { 85 | init(); 86 | 87 | let tmp_dir = tempfile::tempdir().unwrap(); 88 | 89 | for i in 1..127 { 90 | let eicar_file_path = tmp_dir.path().join(format!("no_eicar_{}.txt", i)); 91 | fs::write(eicar_file_path, "heeeello i am no virus, i swear!").unwrap(); 92 | } 93 | 94 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 95 | 96 | assert!(results_rx.recv().is_err()); 97 | } 98 | 99 | #[test] 100 | #[ignore] 101 | fn test_find_threat_in_deep_recursion() { 102 | init(); 103 | 104 | let tmp_dir = tempfile::tempdir().unwrap(); 105 | let mut accu_dir = tmp_dir.path().to_owned(); 106 | 107 | for _i in 1..255 { 108 | accu_dir = accu_dir.join("step"); 109 | fs::create_dir(&accu_dir).unwrap(); 110 | } 111 | 112 | let eicar_file_path = accu_dir.join("eicar.txt"); 113 | fs::write(eicar_file_path, EICAR).unwrap(); 114 | 115 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 116 | 117 | let (_path, res) = results_rx.recv().unwrap(); 118 | assert_eq!(res, "Win.Test.EICAR_HDB-1"); 119 | 120 | assert!(results_rx.recv().is_err()); 121 | } 122 | 123 | #[test] 124 | #[ignore] 125 | fn test_can_not_find_threat_with_missing_permissions_for_file() { 126 | init(); 127 | 128 | let tmp_dir = tempfile::tempdir().unwrap(); 129 | 130 | let eicar_file_path = tmp_dir.path().join("eicar.txt"); 131 | fs::write(&eicar_file_path, EICAR).unwrap(); 132 | 133 | fs::set_permissions(eicar_file_path, fs::Permissions::from_mode(0o0)).unwrap(); 134 | 135 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 136 | 137 | assert!(results_rx.recv().is_err()); 138 | } 139 | 140 | #[test] 141 | #[ignore] 142 | fn test_can_not_find_threat_with_missing_permissions_for_dir() { 143 | init(); 144 | 145 | let tmp_dir = tempfile::tempdir().unwrap(); 146 | 147 | let eicar_file_path = tmp_dir.path().join("eicar.txt"); 148 | fs::write(eicar_file_path, EICAR).unwrap(); 149 | 150 | fs::set_permissions(tmp_dir.path(), fs::Permissions::from_mode(0o0)).unwrap(); 151 | 152 | let results_rx = run_scan(&ScanConfig::default(), tmp_dir.path()); 153 | 154 | assert!(results_rx.recv().is_err()); 155 | } 156 | 157 | #[test] 158 | #[ignore] 159 | fn test_skips_excluded_files_by_absolute_path() { 160 | init(); 161 | 162 | let tmp_dir = tempfile::tempdir().unwrap(); 163 | 164 | let eicar_file_path = tmp_dir.path().join("eicar.txt"); 165 | fs::write(eicar_file_path, EICAR).unwrap(); 166 | 167 | let skip_file_path = tmp_dir.path().join("skip_me.txt"); 168 | fs::write(&skip_file_path, EICAR).unwrap(); 169 | 170 | let scan_config = ScanConfig { 171 | skip_hidden: false, 172 | excludes: vec![ 173 | Pattern::from_str(&skip_file_path.into_os_string().into_string().unwrap()).unwrap(), 174 | ], 175 | ..Default::default() 176 | }; 177 | let results_rx = run_scan(&scan_config, tmp_dir.path()); 178 | 179 | let (_path, res) = results_rx.recv().unwrap(); 180 | assert_eq!(res, "Win.Test.EICAR_HDB-1"); 181 | 182 | assert!(results_rx.recv().is_err()); 183 | } 184 | 185 | #[test] 186 | #[ignore] 187 | fn test_skips_excluded_files_by_absolute_directory_path() { 188 | init(); 189 | 190 | let tmp_dir = tempfile::tempdir().unwrap(); 191 | 192 | let skip_me_dir = tmp_dir.path().join("skip_me"); 193 | fs::create_dir(&skip_me_dir).unwrap(); 194 | 195 | let skip_file_path = skip_me_dir.join("eicar.txt"); 196 | fs::write(skip_file_path, EICAR).unwrap(); 197 | 198 | let scan_config = ScanConfig { 199 | skip_hidden: false, 200 | excludes: vec![ 201 | Pattern::from_str(&skip_me_dir.into_os_string().into_string().unwrap()).unwrap(), 202 | ], 203 | ..Default::default() 204 | }; 205 | let results_rx = run_scan(&scan_config, tmp_dir.path()); 206 | 207 | assert!(results_rx.recv().is_err()); 208 | } 209 | -------------------------------------------------------------------------------- /src/scan.rs: -------------------------------------------------------------------------------- 1 | use crate::args; 2 | use crate::config::{self, ScanConfig}; 3 | use crate::db::Database; 4 | use crate::errors::*; 5 | use crate::notify; 6 | use chrono::TimeZone; 7 | use chrono::{DateTime, Utc}; 8 | use clamav_rs::engine::{Engine, ScanResult}; 9 | use clamav_rs::scan_settings::ScanSettings; 10 | use crossbeam_channel::Sender; 11 | use std::ffi::OsStr; 12 | use std::fs::{self, File, FileType}; 13 | use std::io::Read; 14 | use std::mem; 15 | use std::os::unix::fs::FileTypeExt; 16 | use std::path::Path; 17 | use std::path::PathBuf; 18 | use std::sync::Arc; 19 | use std::thread; 20 | use walkdir::{DirEntry, WalkDir}; 21 | 22 | pub fn init() -> Result<()> { 23 | info!("Initializing with libclamav {}", clamav_rs::version()); 24 | clamav_rs::initialize().map_err(|e| anyhow!("Failed to init clamav: {:#}", e))?; 25 | Ok(()) 26 | } 27 | 28 | // clamav_rs::engine::Engine::scan_file expects &str instead of &Path 29 | fn path_to_string(path: &Path) -> Result { 30 | let s = path.to_str().context("Path contains invalid utf-8")?; 31 | Ok(s.to_string()) 32 | } 33 | 34 | fn is_hidden(entry: &OsStr) -> bool { 35 | entry 36 | .to_str() 37 | .map_or(false, |s| s != "." && s != ".." && s.starts_with('.')) 38 | } 39 | 40 | #[must_use] 41 | pub fn matches(config: &ScanConfig, e: &DirEntry) -> bool { 42 | let path = e.path(); 43 | 44 | if config.skip_hidden && is_hidden(e.file_name()) { 45 | debug!("Skipping path {}: name starts with dot", path.display()); 46 | return false; 47 | } 48 | 49 | for exclude in &config.excludes { 50 | if exclude.matches(e.path()) { 51 | debug!( 52 | "Skipping path {}: matches exclude ({})", 53 | path.display(), 54 | exclude 55 | ); 56 | return false; 57 | } 58 | } 59 | 60 | if let Some(skip_larger_than) = &config.skip_larger_than { 61 | if e.file_type().is_file() { 62 | if let Ok(md) = e.metadata() { 63 | let size = md.len(); 64 | if size > skip_larger_than.as_bytes() { 65 | debug!( 66 | "Skipping path {}: size exceeds limit ({})", 67 | path.display(), 68 | size 69 | ); 70 | return false; 71 | } 72 | } 73 | } 74 | } 75 | 76 | true 77 | } 78 | 79 | pub fn should_be_skipped(ft: &FileType) -> Option<&'static str> { 80 | if ft.is_dir() { 81 | Some("Traversing directory") 82 | } else if ft.is_symlink() { 83 | Some("Skipping symlink") 84 | } else if ft.is_socket() { 85 | Some("Skipping unix socket") 86 | } else if ft.is_fifo() { 87 | Some("Skipping fifo") 88 | } else if ft.is_block_device() { 89 | Some("Skipping block device") 90 | } else if ft.is_char_device() { 91 | Some("Skipping char device") 92 | } else { 93 | None 94 | } 95 | } 96 | 97 | pub fn ingest_directory(cfg: &ScanConfig, tx: &Sender, path: &Path) { 98 | let walker = WalkDir::new(path).into_iter(); 99 | for entry in walker.filter_entry(|e| matches(cfg, e)) { 100 | let entry = match entry { 101 | Ok(entry) => entry, 102 | Err(err) => { 103 | warn!("Failed to scan directory: {:#}", err); 104 | continue; 105 | } 106 | }; 107 | 108 | let path = entry.path(); 109 | let ft = entry.file_type(); 110 | 111 | trace!("Next item from walkdir iterator: {}", path.display()); 112 | 113 | if let Some(reason) = should_be_skipped(&ft) { 114 | debug!("{}: {}", reason, path.display()); 115 | continue; 116 | } 117 | 118 | if tx.send(entry).is_err() { 119 | break; 120 | } 121 | } 122 | } 123 | 124 | pub struct Scanner { 125 | engine: Engine, 126 | signature_count: u32, 127 | signatures_age: DateTime, 128 | } 129 | 130 | impl Scanner { 131 | pub fn new(path: &Path) -> Result { 132 | let scanner = Engine::new(); 133 | info!("Loading database from {}...", path.display()); 134 | 135 | let path_str = path_to_string(path)?; 136 | let stats = scanner 137 | .load_databases(&path_str) 138 | .map_err(|e| anyhow!("Failed to load clamav database: {:#}", e))?; 139 | 140 | info!("Checking database age..."); 141 | let daily_path = Self::find_daily_db_path(path)?; 142 | 143 | let mut buf = [0; 512]; 144 | read_clamav_header(&daily_path, &mut buf)?; 145 | let signatures_age = parse_database_age(&buf)?; 146 | 147 | info!("Compiling clamav rules..."); 148 | scanner 149 | .compile() 150 | .map_err(|e| anyhow!("Failed to compile clamav rules: {:#}", e))?; 151 | 152 | Ok(Scanner { 153 | engine: scanner, 154 | signature_count: stats.signature_count, 155 | signatures_age, 156 | }) 157 | } 158 | 159 | fn find_daily_db_path(base_dir: &Path) -> Result { 160 | for filename in &["daily.cld", "daily.cvd"] { 161 | let daily_path = base_dir.join(filename); 162 | debug!("Checking if database exists: {:?}", daily_path); 163 | if daily_path.exists() { 164 | return Ok(daily_path); 165 | } 166 | } 167 | 168 | bail!("Couldn't find clamav database file"); 169 | } 170 | 171 | #[must_use] 172 | pub fn signature_count(&self) -> usize { 173 | self.signature_count as usize 174 | } 175 | 176 | #[must_use] 177 | pub fn signatures_age(&self) -> DateTime { 178 | self.signatures_age 179 | } 180 | 181 | pub fn scan_file(&self, path: &Path, results_tx: &Sender<(PathBuf, String)>) -> Result<()> { 182 | debug!("Scanning file {}...", path.display()); 183 | 184 | let path_str = path_to_string(path)?; 185 | let mut settings = ScanSettings::default(); 186 | let hit = self 187 | .engine 188 | .scan_file(&path_str, &mut settings) 189 | .map_err(|e| anyhow!("Failed to scan file {:?}: {:#}", path, e))?; 190 | 191 | match hit { 192 | ScanResult::Virus(name) => { 193 | warn!("Found threat: {} ({:?})", path.display(), name); 194 | results_tx.send((path.to_path_buf(), name)).ok(); 195 | } 196 | ScanResult::Clean | ScanResult::Whitelisted => (), 197 | } 198 | 199 | debug!("Finished scanning file {}", path.display()); 200 | 201 | Ok(()) 202 | } 203 | } 204 | 205 | pub fn run(args: args::Scan) -> Result<()> { 206 | let config = config::load(Some(&args)).context("Failed to load config")?; 207 | 208 | let mut db = Database::load().context("Failed to load database")?; 209 | 210 | let paths = if !args.paths.is_empty() { 211 | info!("Scanning provided paths: {:?}", args.paths); 212 | args.paths 213 | } else if !config.scan.paths.is_empty() { 214 | info!("Scanning configured paths: {:?}", config.scan.paths); 215 | config.scan.paths.clone() 216 | } else { 217 | let home_dir = dirs::home_dir().context("Failed to find home directory")?; 218 | info!("Scanning home directory: {:?}", home_dir); 219 | vec![home_dir] 220 | }; 221 | 222 | let data = db.data_mut(); 223 | data.threats.clear(); 224 | 225 | let (results_tx, results_rx) = crossbeam_channel::unbounded(); 226 | let (fs_tx, fs_rx) = crossbeam_channel::bounded::(128); 227 | 228 | let scanner = Scanner::new(&config.update.path)?; 229 | let scanner = Arc::new(scanner); 230 | 231 | let cpus = config.scan.concurrency.unwrap_or_else(num_cpus::get); 232 | 233 | info!("Spawning {} scanner(s)...", cpus); 234 | for _ in 0..cpus { 235 | let results_tx = results_tx.clone(); 236 | let fs_rx = fs_rx.clone(); 237 | let scanner = scanner.clone(); 238 | thread::spawn(move || { 239 | for entry in fs_rx { 240 | if let Err(err) = scanner.scan_file(entry.path(), &results_tx) { 241 | error!("{:#}", err); 242 | } 243 | } 244 | mem::drop(results_tx); 245 | }); 246 | } 247 | mem::drop(results_tx); 248 | 249 | thread::spawn(move || { 250 | for path in paths { 251 | info!("Scanning directory {}...", path.display()); 252 | ingest_directory(&config.scan, &fs_tx, &path); 253 | } 254 | debug!("Finished traversing directories"); 255 | }); 256 | 257 | data.signature_count = scanner.signature_count(); 258 | data.signatures_age = Some(scanner.signatures_age()); 259 | for (path, name) in results_rx { 260 | let path = match fs::canonicalize(&path) { 261 | Ok(path) => path, 262 | Err(err) => { 263 | error!("Failed to canonicalize path {:?}: {:#}", path, err); 264 | path 265 | } 266 | }; 267 | 268 | if let Err(err) = notify::show(&path, &name) { 269 | warn!("Failed to display notification: {:#}", err); 270 | } 271 | data.threats.entry(path).or_default().push(name); 272 | } 273 | info!("Scan finished, found {} threat(s)!", data.threats.len()); 274 | 275 | data.last_scan = Some(Utc::now()); 276 | db.store().context("Failed to write database")?; 277 | 278 | Ok(()) 279 | } 280 | 281 | pub fn read_clamav_header(path: &Path, buf: &mut [u8]) -> Result<()> { 282 | if buf.len() != 512 { 283 | bail!("Buffer has wrong size"); 284 | } 285 | 286 | let mut f = 287 | File::open(path).with_context(|| anyhow!("Failed to open clamav database: {:?}", path))?; 288 | f.read_exact(buf) 289 | .context("Failed to read header from clamav database")?; 290 | 291 | Ok(()) 292 | } 293 | 294 | pub fn parse_database_age(mut buf: &[u8]) -> Result> { 295 | for i in 0..8 { 296 | let idx = memchr::memchr(b':', buf) 297 | .with_context(|| anyhow!("Failed to select field number #{}", i))?; 298 | buf = &buf[idx + 1..]; 299 | } 300 | 301 | let idx = 302 | memchr::memchr(b' ', buf).context("Failed to remove remaining data from timestamp")?; 303 | let buf = &buf[..idx]; 304 | 305 | let num = atoi::atoi::(buf).context("Failed to parse timestamp as number")?; 306 | 307 | let timestamp = Utc 308 | .timestamp_opt(num, 0) 309 | .single() 310 | .with_context(|| anyhow!("Timestamp is not a valid UTC timestamp: {:?}", num))?; 311 | Ok(timestamp) 312 | } 313 | 314 | #[cfg(test)] 315 | mod tests { 316 | use super::*; 317 | 318 | #[test] 319 | fn is_hidden_regular_file() { 320 | let hidden = is_hidden(OsStr::new("x")); 321 | assert!(!hidden); 322 | } 323 | 324 | #[test] 325 | fn is_hidden_hidden_file() { 326 | let hidden = is_hidden(OsStr::new(".x")); 327 | assert!(hidden); 328 | } 329 | 330 | #[test] 331 | fn is_hidden_hidden_current_directory() { 332 | let hidden = is_hidden(OsStr::new(".")); 333 | assert!(!hidden); 334 | } 335 | 336 | #[test] 337 | fn is_hidden_hidden_parent_directory() { 338 | let hidden = is_hidden(OsStr::new("..")); 339 | assert!(!hidden); 340 | } 341 | 342 | #[test] 343 | fn is_hidden_three_dots() { 344 | let hidden = is_hidden(OsStr::new("...")); 345 | assert!(hidden); 346 | } 347 | 348 | #[test] 349 | fn test_datetime_from_header() { 350 | let dt = parse_database_age( 351 | b"ClamAV-VDB:09 May 2021 07-08 -0400:26165:3978101:63:X:X:raynman:1620558516 ", 352 | ) 353 | .unwrap(); 354 | assert_eq!( 355 | dt, 356 | Utc.with_ymd_and_hms(2021, 5, 9, 11, 8, 36) 357 | .single() 358 | .unwrap() 359 | ); 360 | } 361 | } 362 | -------------------------------------------------------------------------------- /src/schedule.rs: -------------------------------------------------------------------------------- 1 | use crate::args; 2 | use crate::config; 3 | use crate::db::Database; 4 | use crate::errors::*; 5 | use crate::scan; 6 | use chrono::{DateTime, Datelike, Local, NaiveTime, TimeZone, Timelike, Utc}; 7 | use rand::Rng; 8 | use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; 9 | use starship_battery as battery; 10 | use std::cmp; 11 | use std::str::FromStr; 12 | use std::thread; 13 | 14 | #[derive(Debug, PartialEq, Eq)] 15 | pub struct PreferedHours { 16 | start: NaiveTime, 17 | end: NaiveTime, 18 | } 19 | 20 | impl PreferedHours { 21 | fn until_next_start(&self, dt: DateTime) -> chrono::Duration { 22 | let t = dt.time(); 23 | if self.start <= t && (self.end > t || self.end < self.start) { 24 | // now 25 | chrono::Duration::zero() 26 | } else if t < self.start { 27 | // today 28 | let next_start = Local 29 | .with_ymd_and_hms( 30 | dt.year(), 31 | dt.month(), 32 | dt.day(), 33 | self.start.hour(), 34 | self.start.minute(), 35 | self.start.second(), 36 | ) 37 | .earliest() 38 | .unwrap(); 39 | next_start - dt 40 | } else { 41 | // tomorrow 42 | let next_start = Local 43 | .with_ymd_and_hms( 44 | dt.year(), 45 | dt.month(), 46 | dt.day(), 47 | self.start.hour(), 48 | self.start.minute(), 49 | self.start.second(), 50 | ) 51 | .earliest() 52 | .unwrap() 53 | + chrono::Duration::hours(24); 54 | next_start - dt 55 | } 56 | } 57 | 58 | fn until_next_end(&self, dt: DateTime) -> chrono::Duration { 59 | let t = dt.time(); 60 | if self.end > t { 61 | // today 62 | let next_end = Local 63 | .with_ymd_and_hms( 64 | dt.year(), 65 | dt.month(), 66 | dt.day(), 67 | self.end.hour(), 68 | self.end.minute(), 69 | self.end.second(), 70 | ) 71 | .earliest() 72 | .unwrap(); 73 | next_end - dt 74 | } else { 75 | // tomorrow 76 | let next_end = Local 77 | .with_ymd_and_hms( 78 | dt.year(), 79 | dt.month(), 80 | dt.day(), 81 | self.end.hour(), 82 | self.end.minute(), 83 | self.end.second(), 84 | ) 85 | .earliest() 86 | .unwrap() 87 | + chrono::Duration::hours(24); 88 | next_end - dt 89 | } 90 | } 91 | } 92 | 93 | impl FromStr for PreferedHours { 94 | type Err = Error; 95 | 96 | fn from_str(s: &str) -> Result { 97 | let parts = s.split('-').collect::>(); 98 | if parts.len() != 2 { 99 | bail!("Unexpected number of arguments"); 100 | } 101 | 102 | let start = parts[0].parse().context("Not a number")?; 103 | let end = parts[1].parse().context("Not a number")?; 104 | 105 | Ok(PreferedHours { start, end }) 106 | } 107 | } 108 | 109 | impl Serialize for PreferedHours { 110 | fn serialize(&self, serializer: S) -> Result 111 | where 112 | S: Serializer, 113 | { 114 | let hours = format!("{}-{}", self.start, self.end); 115 | serializer.serialize_str(&hours) 116 | } 117 | } 118 | 119 | impl<'de> Deserialize<'de> for PreferedHours { 120 | fn deserialize(deserializer: D) -> Result 121 | where 122 | D: Deserializer<'de>, 123 | { 124 | let s = String::deserialize(deserializer)?; 125 | FromStr::from_str(&s).map_err(de::Error::custom) 126 | } 127 | } 128 | 129 | fn robust_sleep(sleep: chrono::Duration) -> Result<()> { 130 | let target_time = Utc::now() + sleep; 131 | 132 | let duration_seconds = sleep.num_seconds() as u64; 133 | let hours = duration_seconds / 60 / 60; 134 | let minutes = (duration_seconds / 60) % 60; 135 | let seconds = duration_seconds % 60; 136 | 137 | info!( 138 | "Sleeping for {}h {}m {}s ({})...", 139 | hours, 140 | minutes, 141 | seconds, 142 | target_time 143 | .with_timezone(&Local) 144 | .format("%Y-%m-%d %H:%M:%S %Z") 145 | ); 146 | 147 | loop { 148 | let remaining = target_time.signed_duration_since(Utc::now()); 149 | trace!("Remaining time: {:?}", remaining); 150 | if remaining <= chrono::Duration::zero() { 151 | break; 152 | } 153 | 154 | let next_sleep = cmp::min(chrono::Duration::seconds(600), remaining); 155 | trace!("Sleeping for {:?}", next_sleep); 156 | 157 | thread::sleep(next_sleep.to_std()?); 158 | } 159 | 160 | Ok(()) 161 | } 162 | 163 | pub fn run(_args: &args::Scheduler) -> Result<()> { 164 | let interval = chrono::Duration::hours(24); 165 | 166 | loop { 167 | let now = Local::now(); 168 | 169 | let config = match config::load(None) { 170 | Ok(config) => config, 171 | Err(err) => { 172 | warn!("Failed to load config, skipping this scan: {:#}", err); 173 | robust_sleep(interval)?; 174 | continue; 175 | } 176 | }; 177 | 178 | if config.schedule.skip_on_battery { 179 | let battery_manager = battery::Manager::new()?; 180 | 181 | let batteries = battery_manager 182 | .batteries() 183 | .context("Failed to detect batteries")? 184 | .collect::>>() 185 | .context("Failed to read battery status")?; 186 | 187 | // Check if there even are batteries in the system. If we don't 188 | // find any batteries we assume that the system has no batteries 189 | // and we start a scan. 190 | if batteries.is_empty() { 191 | debug!("No batteries present in system"); 192 | } else { 193 | // List all batteries and check if any are in state Discharging 194 | let battery_discharging = batteries.iter().fold(false, |discharging, battery| { 195 | let state = battery.state(); 196 | debug!( 197 | "Found battery: {} {}, {:?}% ({:?})", 198 | battery.vendor().unwrap_or("-"), 199 | battery.model().unwrap_or("-"), 200 | battery.state_of_charge() * 100.0, 201 | state, 202 | ); 203 | discharging || state == battery::State::Discharging 204 | }); 205 | 206 | if battery_discharging { 207 | info!("Battery is discharging, skipping this scan"); 208 | robust_sleep(interval)?; 209 | continue; 210 | } 211 | } 212 | } 213 | 214 | match config.schedule.automatic_scans.as_deref() { 215 | Some("off") => { 216 | info!("Automatic scanning is disabled, skipping this scan"); 217 | robust_sleep(interval)?; 218 | continue; 219 | } 220 | Some("daily") | None => (), 221 | value => { 222 | error!( 223 | "Invalid value for automatic_scans, skipping this scan: {:?}", 224 | value 225 | ); 226 | robust_sleep(interval)?; 227 | continue; 228 | } 229 | } 230 | 231 | let db = match Database::load() { 232 | Ok(db) => db, 233 | Err(err) => { 234 | error!("Failed to load database: {:#}", err); 235 | robust_sleep(interval)?; 236 | continue; 237 | } 238 | }; 239 | let data = db.data(); 240 | 241 | let sleep = data 242 | .last_scan 243 | .map_or_else(chrono::Duration::zero, |last_scan| { 244 | let duration_since_last_scan = now - last_scan.with_timezone(&Local); 245 | 246 | if duration_since_last_scan > interval { 247 | chrono::Duration::zero() 248 | } else { 249 | config.schedule.preferred_hours.map_or_else( 250 | // no preferred hours 251 | || interval - (now - last_scan.with_timezone(&Local)), 252 | // there are preferred hours 253 | |ph| { 254 | let start = ph.until_next_start(now); 255 | let end = ph.until_next_end(now); 256 | 257 | let mut rng = rand::thread_rng(); 258 | let preferred_hours_duration = (end - start).num_seconds(); 259 | let jitter = rng.gen_range(0..preferred_hours_duration); 260 | 261 | start + chrono::Duration::seconds(jitter) 262 | }, 263 | ) 264 | } 265 | }); 266 | 267 | robust_sleep(sleep)?; 268 | 269 | if let Err(err) = scan::run(args::Scan::default()) { 270 | error!("Error: {:#}", err); 271 | } 272 | } 273 | } 274 | 275 | #[cfg(test)] 276 | mod tests { 277 | use super::*; 278 | use chrono::TimeZone; 279 | 280 | #[test] 281 | fn test_parse_preferred_hours() { 282 | let ph = PreferedHours::from_str("19:00:00-09:00:00").unwrap(); 283 | assert_eq!( 284 | ph, 285 | PreferedHours { 286 | start: NaiveTime::from_hms_opt(19, 0, 0).unwrap(), 287 | end: NaiveTime::from_hms_opt(9, 0, 0).unwrap(), 288 | } 289 | ); 290 | } 291 | 292 | #[test] 293 | fn test_parse_preferred_hours_invalid() { 294 | PreferedHours::from_str("a").err().unwrap(); 295 | PreferedHours::from_str("a-").err().unwrap(); 296 | PreferedHours::from_str("a--").err().unwrap(); 297 | PreferedHours::from_str("a-b").err().unwrap(); 298 | PreferedHours::from_str("1-b").err().unwrap(); 299 | PreferedHours::from_str("a-2").err().unwrap(); 300 | PreferedHours::from_str("1-2-").err().unwrap(); 301 | PreferedHours::from_str("1-2b").err().unwrap(); 302 | PreferedHours::from_str("1-2").err().unwrap(); 303 | PreferedHours::from_str("1:-2:").err().unwrap(); 304 | } 305 | 306 | #[test] 307 | fn test_until_next_preferred_hour_start() { 308 | let now = Local 309 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 310 | .single() 311 | .unwrap(); 312 | let ph = PreferedHours::from_str("19:00:00-09:00:00").unwrap(); 313 | let duration = ph.until_next_start(now); 314 | assert_eq!(duration, chrono::Duration::seconds(5 * 3600 + 23 * 60)); 315 | } 316 | 317 | #[test] 318 | fn test_until_next_preferred_hour_end() { 319 | let now = Local 320 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 321 | .single() 322 | .unwrap(); 323 | let ph = PreferedHours::from_str("19:00:00-09:00:00").unwrap(); 324 | let duration = ph.until_next_end(now); 325 | assert_eq!(duration, chrono::Duration::seconds(19 * 3600 + 23 * 60)); 326 | } 327 | 328 | #[test] 329 | fn test_until_next_preferred_hour_start_now() { 330 | let now = Local 331 | .with_ymd_and_hms(1970, 1, 1, 23, 37, 0) 332 | .single() 333 | .unwrap(); 334 | let ph = PreferedHours::from_str("19:00:00-09:00:00").unwrap(); 335 | let duration = ph.until_next_start(now); 336 | assert_eq!(duration, chrono::Duration::seconds(0)); 337 | } 338 | 339 | #[test] 340 | fn test_until_next_preferred_hour_end_now() { 341 | let now = Local 342 | .with_ymd_and_hms(1970, 1, 1, 23, 37, 0) 343 | .single() 344 | .unwrap(); 345 | let ph = PreferedHours::from_str("19:00:00-09:00:00").unwrap(); 346 | let duration = ph.until_next_end(now); 347 | assert_eq!(duration, chrono::Duration::seconds(9 * 3600 + 23 * 60)); 348 | } 349 | 350 | #[test] 351 | fn test_until_next_preferred_hour_start_now2() { 352 | let now = Local 353 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 354 | .single() 355 | .unwrap(); 356 | let ph = PreferedHours::from_str("09:00:00-19:00:00").unwrap(); 357 | let duration = ph.until_next_start(now); 358 | assert_eq!(duration, chrono::Duration::seconds(0)); 359 | } 360 | 361 | #[test] 362 | fn test_until_next_preferred_hour_end_now2() { 363 | let now = Local 364 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 365 | .single() 366 | .unwrap(); 367 | let ph = PreferedHours::from_str("09:00:00-19:00:00").unwrap(); 368 | let duration = ph.until_next_end(now); 369 | assert_eq!(duration, chrono::Duration::seconds(5 * 3600 + 23 * 60)); 370 | } 371 | 372 | #[test] 373 | fn test_until_next_preferred_hour_start_later() { 374 | let now = Local 375 | .with_ymd_and_hms(1970, 1, 1, 9, 0, 0) 376 | .single() 377 | .unwrap(); 378 | let ph = PreferedHours::from_str("13:37:00-23:00:00").unwrap(); 379 | let duration = ph.until_next_start(now); 380 | assert_eq!(duration, chrono::Duration::seconds(4 * 3600 + 37 * 60)); 381 | } 382 | 383 | #[test] 384 | fn test_until_next_preferred_hour_end_later() { 385 | let now = Local 386 | .with_ymd_and_hms(1970, 1, 1, 9, 0, 0) 387 | .single() 388 | .unwrap(); 389 | let ph = PreferedHours::from_str("13:37:00-23:00:00").unwrap(); 390 | let duration = ph.until_next_end(now); 391 | assert_eq!(duration, chrono::Duration::seconds(14 * 3600)); 392 | } 393 | 394 | #[test] 395 | fn test_until_next_preferred_hour_start_tomorrow() { 396 | let now = Local 397 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 398 | .single() 399 | .unwrap(); 400 | let ph = PreferedHours::from_str("4:00:00-9:00:00").unwrap(); 401 | let duration = ph.until_next_start(now); 402 | assert_eq!(duration, chrono::Duration::seconds(14 * 3600 + 23 * 60)); 403 | } 404 | 405 | #[test] 406 | fn test_until_next_preferred_hour_end_tomorrow() { 407 | let now = Local 408 | .with_ymd_and_hms(1970, 1, 1, 13, 37, 0) 409 | .single() 410 | .unwrap(); 411 | let ph = PreferedHours::from_str("4:00:00-9:00:00").unwrap(); 412 | let duration = ph.until_next_end(now); 413 | assert_eq!(duration, chrono::Duration::seconds(19 * 3600 + 23 * 60)); 414 | } 415 | 416 | #[test] 417 | fn test_serialize_preferred_hours() { 418 | let txt = "13:37:00-23:00:00"; 419 | let p = PreferedHours::from_str(txt).unwrap(); 420 | let json = serde_json::to_string(&p).unwrap(); 421 | assert_eq!(json, "\"13:37:00-23:00:00\""); 422 | } 423 | } 424 | -------------------------------------------------------------------------------- /LICENSE-GPL2: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /LICENSE-GPL3: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.0.5" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "android-tzdata" 16 | version = "0.1.1" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 19 | 20 | [[package]] 21 | name = "android_system_properties" 22 | version = "0.1.5" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 25 | dependencies = [ 26 | "libc", 27 | ] 28 | 29 | [[package]] 30 | name = "ansi_term" 31 | version = "0.12.1" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 34 | dependencies = [ 35 | "winapi", 36 | ] 37 | 38 | [[package]] 39 | name = "anstream" 40 | version = "0.5.0" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" 43 | dependencies = [ 44 | "anstyle", 45 | "anstyle-parse", 46 | "anstyle-query", 47 | "anstyle-wincon", 48 | "colorchoice", 49 | "utf8parse", 50 | ] 51 | 52 | [[package]] 53 | name = "anstyle" 54 | version = "1.0.2" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" 57 | 58 | [[package]] 59 | name = "anstyle-parse" 60 | version = "0.2.1" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" 63 | dependencies = [ 64 | "utf8parse", 65 | ] 66 | 67 | [[package]] 68 | name = "anstyle-query" 69 | version = "1.0.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" 72 | dependencies = [ 73 | "windows-sys 0.48.0", 74 | ] 75 | 76 | [[package]] 77 | name = "anstyle-wincon" 78 | version = "2.1.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" 81 | dependencies = [ 82 | "anstyle", 83 | "windows-sys 0.48.0", 84 | ] 85 | 86 | [[package]] 87 | name = "anyhow" 88 | version = "1.0.75" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" 91 | 92 | [[package]] 93 | name = "arrayvec" 94 | version = "0.7.4" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 97 | 98 | [[package]] 99 | name = "async-broadcast" 100 | version = "0.5.1" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" 103 | dependencies = [ 104 | "event-listener", 105 | "futures-core", 106 | ] 107 | 108 | [[package]] 109 | name = "async-channel" 110 | version = "1.9.0" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" 113 | dependencies = [ 114 | "concurrent-queue", 115 | "event-listener", 116 | "futures-core", 117 | ] 118 | 119 | [[package]] 120 | name = "async-executor" 121 | version = "1.5.1" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" 124 | dependencies = [ 125 | "async-lock", 126 | "async-task", 127 | "concurrent-queue", 128 | "fastrand 1.9.0", 129 | "futures-lite", 130 | "slab", 131 | ] 132 | 133 | [[package]] 134 | name = "async-fs" 135 | version = "1.6.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" 138 | dependencies = [ 139 | "async-lock", 140 | "autocfg", 141 | "blocking", 142 | "futures-lite", 143 | ] 144 | 145 | [[package]] 146 | name = "async-io" 147 | version = "1.13.0" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" 150 | dependencies = [ 151 | "async-lock", 152 | "autocfg", 153 | "cfg-if", 154 | "concurrent-queue", 155 | "futures-lite", 156 | "log", 157 | "parking", 158 | "polling", 159 | "rustix 0.37.13", 160 | "slab", 161 | "socket2", 162 | "waker-fn", 163 | ] 164 | 165 | [[package]] 166 | name = "async-lock" 167 | version = "2.8.0" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" 170 | dependencies = [ 171 | "event-listener", 172 | ] 173 | 174 | [[package]] 175 | name = "async-process" 176 | version = "1.7.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" 179 | dependencies = [ 180 | "async-io", 181 | "async-lock", 182 | "autocfg", 183 | "blocking", 184 | "cfg-if", 185 | "event-listener", 186 | "futures-lite", 187 | "rustix 0.37.13", 188 | "signal-hook", 189 | "windows-sys 0.48.0", 190 | ] 191 | 192 | [[package]] 193 | name = "async-recursion" 194 | version = "1.0.5" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" 197 | dependencies = [ 198 | "proc-macro2", 199 | "quote", 200 | "syn 2.0.31", 201 | ] 202 | 203 | [[package]] 204 | name = "async-task" 205 | version = "4.4.0" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" 208 | 209 | [[package]] 210 | name = "async-trait" 211 | version = "0.1.73" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" 214 | dependencies = [ 215 | "proc-macro2", 216 | "quote", 217 | "syn 2.0.31", 218 | ] 219 | 220 | [[package]] 221 | name = "atoi" 222 | version = "2.0.0" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 225 | dependencies = [ 226 | "num-traits", 227 | ] 228 | 229 | [[package]] 230 | name = "atomic-waker" 231 | version = "1.1.1" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" 234 | 235 | [[package]] 236 | name = "atty" 237 | version = "0.2.14" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 240 | dependencies = [ 241 | "hermit-abi 0.1.19", 242 | "libc", 243 | "winapi", 244 | ] 245 | 246 | [[package]] 247 | name = "autocfg" 248 | version = "1.1.0" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 251 | 252 | [[package]] 253 | name = "bindgen" 254 | version = "0.56.0" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" 257 | dependencies = [ 258 | "bitflags 1.2.1", 259 | "cexpr", 260 | "clang-sys", 261 | "clap 2.34.0", 262 | "env_logger 0.8.4", 263 | "lazy_static", 264 | "lazycell", 265 | "log", 266 | "peeking_take_while", 267 | "proc-macro2", 268 | "quote", 269 | "regex", 270 | "rustc-hash", 271 | "shlex", 272 | "which", 273 | ] 274 | 275 | [[package]] 276 | name = "bitflags" 277 | version = "1.2.1" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 280 | 281 | [[package]] 282 | name = "bitflags" 283 | version = "2.4.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" 286 | 287 | [[package]] 288 | name = "block" 289 | version = "0.1.6" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 292 | 293 | [[package]] 294 | name = "block-buffer" 295 | version = "0.10.4" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 298 | dependencies = [ 299 | "generic-array", 300 | ] 301 | 302 | [[package]] 303 | name = "blocking" 304 | version = "1.3.1" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" 307 | dependencies = [ 308 | "async-channel", 309 | "async-lock", 310 | "async-task", 311 | "atomic-waker", 312 | "fastrand 1.9.0", 313 | "futures-lite", 314 | "log", 315 | ] 316 | 317 | [[package]] 318 | name = "bumpalo" 319 | version = "3.13.0" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 322 | 323 | [[package]] 324 | name = "byteorder" 325 | version = "1.4.3" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 328 | 329 | [[package]] 330 | name = "cc" 331 | version = "1.0.83" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 334 | dependencies = [ 335 | "libc", 336 | ] 337 | 338 | [[package]] 339 | name = "cexpr" 340 | version = "0.4.0" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" 343 | dependencies = [ 344 | "nom 5.1.3", 345 | ] 346 | 347 | [[package]] 348 | name = "cfg-if" 349 | version = "1.0.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 352 | 353 | [[package]] 354 | name = "chrono" 355 | version = "0.4.28" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" 358 | dependencies = [ 359 | "android-tzdata", 360 | "iana-time-zone", 361 | "js-sys", 362 | "num-traits", 363 | "serde", 364 | "time 0.1.45", 365 | "wasm-bindgen", 366 | "windows-targets", 367 | ] 368 | 369 | [[package]] 370 | name = "chrono-humanize" 371 | version = "0.2.3" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" 374 | dependencies = [ 375 | "chrono", 376 | ] 377 | 378 | [[package]] 379 | name = "clamav-rs" 380 | version = "0.5.5" 381 | source = "git+https://github.com/kpcyrd/clamav-rs?branch=clamav-1.2#1d6fa2783e775237092bb31f08de95c08af35e3f" 382 | dependencies = [ 383 | "bitflags 2.4.0", 384 | "clamav-rs-bindings", 385 | "clamav-sys", 386 | "libc", 387 | "pkg-config", 388 | "semver", 389 | ] 390 | 391 | [[package]] 392 | name = "clamav-rs-bindings" 393 | version = "0.5.5" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "875eb2dadac28a82b1e83239d9c961a631f58bce61c8da961c911c82a1a2945b" 396 | dependencies = [ 397 | "windows 0.10.0", 398 | ] 399 | 400 | [[package]] 401 | name = "clamav-sys" 402 | version = "0.0.5" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "e21e9afb353a7e920743351ebbd212a122d1e74bee8ac308271a2d002e84fcc9" 405 | dependencies = [ 406 | "bindgen", 407 | "pkg-config", 408 | "vcpkg", 409 | ] 410 | 411 | [[package]] 412 | name = "clang-sys" 413 | version = "1.6.1" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" 416 | dependencies = [ 417 | "glob", 418 | "libc", 419 | "libloading", 420 | ] 421 | 422 | [[package]] 423 | name = "clap" 424 | version = "2.34.0" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 427 | dependencies = [ 428 | "ansi_term", 429 | "atty", 430 | "bitflags 1.2.1", 431 | "strsim 0.8.0", 432 | "textwrap", 433 | "unicode-width", 434 | "vec_map", 435 | ] 436 | 437 | [[package]] 438 | name = "clap" 439 | version = "4.4.2" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" 442 | dependencies = [ 443 | "clap_builder", 444 | "clap_derive", 445 | ] 446 | 447 | [[package]] 448 | name = "clap_builder" 449 | version = "4.4.2" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" 452 | dependencies = [ 453 | "anstream", 454 | "anstyle", 455 | "clap_lex", 456 | "strsim 0.10.0", 457 | ] 458 | 459 | [[package]] 460 | name = "clap_complete" 461 | version = "4.4.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" 464 | dependencies = [ 465 | "clap 4.4.2", 466 | ] 467 | 468 | [[package]] 469 | name = "clap_derive" 470 | version = "4.4.2" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" 473 | dependencies = [ 474 | "heck", 475 | "proc-macro2", 476 | "quote", 477 | "syn 2.0.31", 478 | ] 479 | 480 | [[package]] 481 | name = "clap_lex" 482 | version = "0.5.1" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" 485 | 486 | [[package]] 487 | name = "colorchoice" 488 | version = "1.0.0" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" 491 | 492 | [[package]] 493 | name = "colored" 494 | version = "2.0.4" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" 497 | dependencies = [ 498 | "is-terminal", 499 | "lazy_static", 500 | "windows-sys 0.48.0", 501 | ] 502 | 503 | [[package]] 504 | name = "concurrent-queue" 505 | version = "2.2.0" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" 508 | dependencies = [ 509 | "crossbeam-utils", 510 | ] 511 | 512 | [[package]] 513 | name = "config" 514 | version = "0.13.3" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "d379af7f68bfc21714c6c7dea883544201741d2ce8274bb12fa54f89507f52a7" 517 | dependencies = [ 518 | "async-trait", 519 | "lazy_static", 520 | "nom 7.1.3", 521 | "pathdiff", 522 | "serde", 523 | "toml", 524 | ] 525 | 526 | [[package]] 527 | name = "const-sha1" 528 | version = "0.2.0" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d" 531 | 532 | [[package]] 533 | name = "core-foundation" 534 | version = "0.7.0" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" 537 | dependencies = [ 538 | "core-foundation-sys 0.7.0", 539 | "libc", 540 | ] 541 | 542 | [[package]] 543 | name = "core-foundation-sys" 544 | version = "0.7.0" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" 547 | 548 | [[package]] 549 | name = "core-foundation-sys" 550 | version = "0.8.4" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" 553 | 554 | [[package]] 555 | name = "cpufeatures" 556 | version = "0.2.9" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" 559 | dependencies = [ 560 | "libc", 561 | ] 562 | 563 | [[package]] 564 | name = "crossbeam-channel" 565 | version = "0.5.8" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" 568 | dependencies = [ 569 | "cfg-if", 570 | "crossbeam-utils", 571 | ] 572 | 573 | [[package]] 574 | name = "crossbeam-utils" 575 | version = "0.8.16" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 578 | dependencies = [ 579 | "cfg-if", 580 | ] 581 | 582 | [[package]] 583 | name = "crypto-common" 584 | version = "0.1.6" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 587 | dependencies = [ 588 | "generic-array", 589 | "typenum", 590 | ] 591 | 592 | [[package]] 593 | name = "deranged" 594 | version = "0.3.8" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" 597 | 598 | [[package]] 599 | name = "derivative" 600 | version = "2.2.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 603 | dependencies = [ 604 | "proc-macro2", 605 | "quote", 606 | "syn 1.0.109", 607 | ] 608 | 609 | [[package]] 610 | name = "digest" 611 | version = "0.10.7" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 614 | dependencies = [ 615 | "block-buffer", 616 | "crypto-common", 617 | ] 618 | 619 | [[package]] 620 | name = "dirs" 621 | version = "5.0.1" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" 624 | dependencies = [ 625 | "dirs-sys", 626 | ] 627 | 628 | [[package]] 629 | name = "dirs-next" 630 | version = "2.0.0" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 633 | dependencies = [ 634 | "cfg-if", 635 | "dirs-sys-next", 636 | ] 637 | 638 | [[package]] 639 | name = "dirs-sys" 640 | version = "0.4.1" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" 643 | dependencies = [ 644 | "libc", 645 | "option-ext", 646 | "redox_users", 647 | "windows-sys 0.48.0", 648 | ] 649 | 650 | [[package]] 651 | name = "dirs-sys-next" 652 | version = "0.1.2" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 655 | dependencies = [ 656 | "libc", 657 | "redox_users", 658 | "winapi", 659 | ] 660 | 661 | [[package]] 662 | name = "enumflags2" 663 | version = "0.7.7" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" 666 | dependencies = [ 667 | "enumflags2_derive", 668 | "serde", 669 | ] 670 | 671 | [[package]] 672 | name = "enumflags2_derive" 673 | version = "0.7.7" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" 676 | dependencies = [ 677 | "proc-macro2", 678 | "quote", 679 | "syn 2.0.31", 680 | ] 681 | 682 | [[package]] 683 | name = "env_logger" 684 | version = "0.8.4" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" 687 | dependencies = [ 688 | "atty", 689 | "humantime", 690 | "log", 691 | "regex", 692 | "termcolor", 693 | ] 694 | 695 | [[package]] 696 | name = "env_logger" 697 | version = "0.10.0" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" 700 | dependencies = [ 701 | "humantime", 702 | "is-terminal", 703 | "log", 704 | "regex", 705 | "termcolor", 706 | ] 707 | 708 | [[package]] 709 | name = "equivalent" 710 | version = "1.0.1" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 713 | 714 | [[package]] 715 | name = "errno" 716 | version = "0.3.3" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" 719 | dependencies = [ 720 | "errno-dragonfly", 721 | "libc", 722 | "windows-sys 0.48.0", 723 | ] 724 | 725 | [[package]] 726 | name = "errno-dragonfly" 727 | version = "0.1.2" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 730 | dependencies = [ 731 | "cc", 732 | "libc", 733 | ] 734 | 735 | [[package]] 736 | name = "event-listener" 737 | version = "2.5.3" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 740 | 741 | [[package]] 742 | name = "fastrand" 743 | version = "1.9.0" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 746 | dependencies = [ 747 | "instant", 748 | ] 749 | 750 | [[package]] 751 | name = "fastrand" 752 | version = "2.0.0" 753 | source = "registry+https://github.com/rust-lang/crates.io-index" 754 | checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" 755 | 756 | [[package]] 757 | name = "futures-core" 758 | version = "0.3.28" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 761 | 762 | [[package]] 763 | name = "futures-io" 764 | version = "0.3.28" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 767 | 768 | [[package]] 769 | name = "futures-lite" 770 | version = "1.13.0" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" 773 | dependencies = [ 774 | "fastrand 1.9.0", 775 | "futures-core", 776 | "futures-io", 777 | "memchr", 778 | "parking", 779 | "pin-project-lite", 780 | "waker-fn", 781 | ] 782 | 783 | [[package]] 784 | name = "futures-sink" 785 | version = "0.3.28" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 788 | 789 | [[package]] 790 | name = "futures-task" 791 | version = "0.3.28" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 794 | 795 | [[package]] 796 | name = "futures-util" 797 | version = "0.3.28" 798 | source = "registry+https://github.com/rust-lang/crates.io-index" 799 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 800 | dependencies = [ 801 | "futures-core", 802 | "futures-io", 803 | "futures-sink", 804 | "futures-task", 805 | "memchr", 806 | "pin-project-lite", 807 | "pin-utils", 808 | "slab", 809 | ] 810 | 811 | [[package]] 812 | name = "generic-array" 813 | version = "0.14.7" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 816 | dependencies = [ 817 | "typenum", 818 | "version_check", 819 | ] 820 | 821 | [[package]] 822 | name = "getrandom" 823 | version = "0.2.10" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 826 | dependencies = [ 827 | "cfg-if", 828 | "libc", 829 | "wasi 0.11.0+wasi-snapshot-preview1", 830 | ] 831 | 832 | [[package]] 833 | name = "glob" 834 | version = "0.3.1" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 837 | 838 | [[package]] 839 | name = "hashbrown" 840 | version = "0.14.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" 843 | 844 | [[package]] 845 | name = "heck" 846 | version = "0.4.1" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 849 | 850 | [[package]] 851 | name = "hermit-abi" 852 | version = "0.1.19" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 855 | dependencies = [ 856 | "libc", 857 | ] 858 | 859 | [[package]] 860 | name = "hermit-abi" 861 | version = "0.3.2" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 864 | 865 | [[package]] 866 | name = "hex" 867 | version = "0.4.3" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 870 | 871 | [[package]] 872 | name = "human-size" 873 | version = "0.4.3" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "9994b79e8c1a39b3166c63ae7823bb2b00831e2a96a31399c50fe69df408eaeb" 876 | 877 | [[package]] 878 | name = "humantime" 879 | version = "2.1.0" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 882 | 883 | [[package]] 884 | name = "iana-time-zone" 885 | version = "0.1.57" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" 888 | dependencies = [ 889 | "android_system_properties", 890 | "core-foundation-sys 0.8.4", 891 | "iana-time-zone-haiku", 892 | "js-sys", 893 | "wasm-bindgen", 894 | "windows 0.48.0", 895 | ] 896 | 897 | [[package]] 898 | name = "iana-time-zone-haiku" 899 | version = "0.1.2" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 902 | dependencies = [ 903 | "cc", 904 | ] 905 | 906 | [[package]] 907 | name = "indexmap" 908 | version = "2.0.0" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" 911 | dependencies = [ 912 | "equivalent", 913 | "hashbrown", 914 | ] 915 | 916 | [[package]] 917 | name = "instant" 918 | version = "0.1.12" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 921 | dependencies = [ 922 | "cfg-if", 923 | ] 924 | 925 | [[package]] 926 | name = "io-lifetimes" 927 | version = "1.0.11" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 930 | dependencies = [ 931 | "hermit-abi 0.3.2", 932 | "libc", 933 | "windows-sys 0.48.0", 934 | ] 935 | 936 | [[package]] 937 | name = "ioprio" 938 | version = "0.2.0" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "aed03c9a950f47958e5c6c4f974cf1b609aee1857ecc34bf68166dc6af782efc" 941 | dependencies = [ 942 | "libc", 943 | "nix 0.21.2", 944 | ] 945 | 946 | [[package]] 947 | name = "is-terminal" 948 | version = "0.4.9" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" 951 | dependencies = [ 952 | "hermit-abi 0.3.2", 953 | "rustix 0.38.11", 954 | "windows-sys 0.48.0", 955 | ] 956 | 957 | [[package]] 958 | name = "itoa" 959 | version = "1.0.9" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 962 | 963 | [[package]] 964 | name = "js-sys" 965 | version = "0.3.64" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" 968 | dependencies = [ 969 | "wasm-bindgen", 970 | ] 971 | 972 | [[package]] 973 | name = "lazy_static" 974 | version = "1.4.0" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 977 | 978 | [[package]] 979 | name = "lazycell" 980 | version = "1.3.0" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 983 | 984 | [[package]] 985 | name = "libc" 986 | version = "0.2.147" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 989 | 990 | [[package]] 991 | name = "libloading" 992 | version = "0.7.4" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 995 | dependencies = [ 996 | "cfg-if", 997 | "winapi", 998 | ] 999 | 1000 | [[package]] 1001 | name = "libredefender" 1002 | version = "0.7.0" 1003 | dependencies = [ 1004 | "anyhow", 1005 | "atoi", 1006 | "chrono", 1007 | "chrono-humanize", 1008 | "clamav-rs", 1009 | "clap 4.4.2", 1010 | "clap_complete", 1011 | "colored", 1012 | "config", 1013 | "crossbeam-channel", 1014 | "dirs", 1015 | "env_logger 0.10.0", 1016 | "glob", 1017 | "human-size", 1018 | "ioprio", 1019 | "libc", 1020 | "log", 1021 | "memchr", 1022 | "notify-rust", 1023 | "num-format", 1024 | "num_cpus", 1025 | "rand", 1026 | "serde", 1027 | "serde_json", 1028 | "starship-battery", 1029 | "tempfile", 1030 | "v_htmlescape", 1031 | "walkdir", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "linux-raw-sys" 1036 | version = "0.3.8" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 1039 | 1040 | [[package]] 1041 | name = "linux-raw-sys" 1042 | version = "0.4.5" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" 1045 | 1046 | [[package]] 1047 | name = "log" 1048 | version = "0.4.20" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 1051 | 1052 | [[package]] 1053 | name = "mac-notification-sys" 1054 | version = "0.6.1" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64" 1057 | dependencies = [ 1058 | "cc", 1059 | "dirs-next", 1060 | "objc-foundation", 1061 | "objc_id", 1062 | "time 0.3.28", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "mach" 1067 | version = "0.3.2" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 1070 | dependencies = [ 1071 | "libc", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "malloc_buf" 1076 | version = "0.0.6" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1079 | dependencies = [ 1080 | "libc", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "memchr" 1085 | version = "2.6.3" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" 1088 | 1089 | [[package]] 1090 | name = "memoffset" 1091 | version = "0.6.5" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1094 | dependencies = [ 1095 | "autocfg", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "memoffset" 1100 | version = "0.7.1" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 1103 | dependencies = [ 1104 | "autocfg", 1105 | ] 1106 | 1107 | [[package]] 1108 | name = "minimal-lexical" 1109 | version = "0.2.1" 1110 | source = "registry+https://github.com/rust-lang/crates.io-index" 1111 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1112 | 1113 | [[package]] 1114 | name = "nix" 1115 | version = "0.21.2" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "77d9f3521ea8e0641a153b3cddaf008dcbf26acd4ed739a2517295e0760d12c7" 1118 | dependencies = [ 1119 | "bitflags 1.2.1", 1120 | "cc", 1121 | "cfg-if", 1122 | "libc", 1123 | "memoffset 0.6.5", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "nix" 1128 | version = "0.23.2" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" 1131 | dependencies = [ 1132 | "bitflags 1.2.1", 1133 | "cc", 1134 | "cfg-if", 1135 | "libc", 1136 | "memoffset 0.6.5", 1137 | ] 1138 | 1139 | [[package]] 1140 | name = "nix" 1141 | version = "0.26.4" 1142 | source = "registry+https://github.com/rust-lang/crates.io-index" 1143 | checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" 1144 | dependencies = [ 1145 | "bitflags 1.2.1", 1146 | "cfg-if", 1147 | "libc", 1148 | "memoffset 0.7.1", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "nom" 1153 | version = "5.1.3" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" 1156 | dependencies = [ 1157 | "memchr", 1158 | "version_check", 1159 | ] 1160 | 1161 | [[package]] 1162 | name = "nom" 1163 | version = "7.1.3" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1166 | dependencies = [ 1167 | "memchr", 1168 | "minimal-lexical", 1169 | ] 1170 | 1171 | [[package]] 1172 | name = "notify-rust" 1173 | version = "4.9.0" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "6d7b75c8958cb2eab3451538b32db8a7b74006abc33eb2e6a9a56d21e4775c2b" 1176 | dependencies = [ 1177 | "log", 1178 | "mac-notification-sys", 1179 | "serde", 1180 | "tauri-winrt-notification", 1181 | "zbus", 1182 | ] 1183 | 1184 | [[package]] 1185 | name = "num-format" 1186 | version = "0.4.4" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" 1189 | dependencies = [ 1190 | "arrayvec", 1191 | "itoa", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "num-traits" 1196 | version = "0.2.16" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" 1199 | dependencies = [ 1200 | "autocfg", 1201 | ] 1202 | 1203 | [[package]] 1204 | name = "num_cpus" 1205 | version = "1.16.0" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1208 | dependencies = [ 1209 | "hermit-abi 0.3.2", 1210 | "libc", 1211 | ] 1212 | 1213 | [[package]] 1214 | name = "objc" 1215 | version = "0.2.7" 1216 | source = "registry+https://github.com/rust-lang/crates.io-index" 1217 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1218 | dependencies = [ 1219 | "malloc_buf", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "objc-foundation" 1224 | version = "0.1.1" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1227 | dependencies = [ 1228 | "block", 1229 | "objc", 1230 | "objc_id", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "objc_id" 1235 | version = "0.1.1" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1238 | dependencies = [ 1239 | "objc", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "once_cell" 1244 | version = "1.18.0" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1247 | 1248 | [[package]] 1249 | name = "option-ext" 1250 | version = "0.2.0" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" 1253 | 1254 | [[package]] 1255 | name = "ordered-stream" 1256 | version = "0.2.0" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" 1259 | dependencies = [ 1260 | "futures-core", 1261 | "pin-project-lite", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "parking" 1266 | version = "2.1.0" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" 1269 | 1270 | [[package]] 1271 | name = "pathdiff" 1272 | version = "0.2.1" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" 1275 | 1276 | [[package]] 1277 | name = "peeking_take_while" 1278 | version = "0.1.2" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 1281 | 1282 | [[package]] 1283 | name = "pin-project-lite" 1284 | version = "0.2.13" 1285 | source = "registry+https://github.com/rust-lang/crates.io-index" 1286 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 1287 | 1288 | [[package]] 1289 | name = "pin-utils" 1290 | version = "0.1.0" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1293 | 1294 | [[package]] 1295 | name = "pkg-config" 1296 | version = "0.3.27" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1299 | 1300 | [[package]] 1301 | name = "polling" 1302 | version = "2.5.2" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" 1305 | dependencies = [ 1306 | "autocfg", 1307 | "cfg-if", 1308 | "libc", 1309 | "log", 1310 | "wepoll-ffi", 1311 | "windows-sys 0.42.0", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "ppv-lite86" 1316 | version = "0.2.17" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1319 | 1320 | [[package]] 1321 | name = "proc-macro-crate" 1322 | version = "1.3.1" 1323 | source = "registry+https://github.com/rust-lang/crates.io-index" 1324 | checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" 1325 | dependencies = [ 1326 | "once_cell", 1327 | "toml_edit", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "proc-macro2" 1332 | version = "1.0.66" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" 1335 | dependencies = [ 1336 | "unicode-ident", 1337 | ] 1338 | 1339 | [[package]] 1340 | name = "quick-xml" 1341 | version = "0.23.1" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" 1344 | dependencies = [ 1345 | "memchr", 1346 | ] 1347 | 1348 | [[package]] 1349 | name = "quote" 1350 | version = "1.0.33" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 1353 | dependencies = [ 1354 | "proc-macro2", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "rand" 1359 | version = "0.8.5" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1362 | dependencies = [ 1363 | "libc", 1364 | "rand_chacha", 1365 | "rand_core", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "rand_chacha" 1370 | version = "0.3.1" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1373 | dependencies = [ 1374 | "ppv-lite86", 1375 | "rand_core", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "rand_core" 1380 | version = "0.6.4" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1383 | dependencies = [ 1384 | "getrandom", 1385 | ] 1386 | 1387 | [[package]] 1388 | name = "redox_syscall" 1389 | version = "0.2.16" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1392 | dependencies = [ 1393 | "bitflags 1.2.1", 1394 | ] 1395 | 1396 | [[package]] 1397 | name = "redox_syscall" 1398 | version = "0.3.5" 1399 | source = "registry+https://github.com/rust-lang/crates.io-index" 1400 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 1401 | dependencies = [ 1402 | "bitflags 1.2.1", 1403 | ] 1404 | 1405 | [[package]] 1406 | name = "redox_users" 1407 | version = "0.4.3" 1408 | source = "registry+https://github.com/rust-lang/crates.io-index" 1409 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1410 | dependencies = [ 1411 | "getrandom", 1412 | "redox_syscall 0.2.16", 1413 | "thiserror", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "regex" 1418 | version = "1.9.5" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" 1421 | dependencies = [ 1422 | "aho-corasick", 1423 | "memchr", 1424 | "regex-automata", 1425 | "regex-syntax", 1426 | ] 1427 | 1428 | [[package]] 1429 | name = "regex-automata" 1430 | version = "0.3.8" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" 1433 | dependencies = [ 1434 | "aho-corasick", 1435 | "memchr", 1436 | "regex-syntax", 1437 | ] 1438 | 1439 | [[package]] 1440 | name = "regex-syntax" 1441 | version = "0.7.5" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" 1444 | 1445 | [[package]] 1446 | name = "rustc-hash" 1447 | version = "1.1.0" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1450 | 1451 | [[package]] 1452 | name = "rustix" 1453 | version = "0.37.13" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" 1456 | dependencies = [ 1457 | "bitflags 1.2.1", 1458 | "errno", 1459 | "io-lifetimes", 1460 | "libc", 1461 | "linux-raw-sys 0.3.8", 1462 | "windows-sys 0.48.0", 1463 | ] 1464 | 1465 | [[package]] 1466 | name = "rustix" 1467 | version = "0.38.11" 1468 | source = "registry+https://github.com/rust-lang/crates.io-index" 1469 | checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" 1470 | dependencies = [ 1471 | "bitflags 2.4.0", 1472 | "errno", 1473 | "libc", 1474 | "linux-raw-sys 0.4.5", 1475 | "windows-sys 0.48.0", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "ryu" 1480 | version = "1.0.15" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 1483 | 1484 | [[package]] 1485 | name = "same-file" 1486 | version = "1.0.6" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1489 | dependencies = [ 1490 | "winapi-util", 1491 | ] 1492 | 1493 | [[package]] 1494 | name = "semver" 1495 | version = "1.0.18" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" 1498 | 1499 | [[package]] 1500 | name = "serde" 1501 | version = "1.0.188" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" 1504 | dependencies = [ 1505 | "serde_derive", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "serde_derive" 1510 | version = "1.0.188" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" 1513 | dependencies = [ 1514 | "proc-macro2", 1515 | "quote", 1516 | "syn 2.0.31", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "serde_json" 1521 | version = "1.0.105" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" 1524 | dependencies = [ 1525 | "itoa", 1526 | "ryu", 1527 | "serde", 1528 | ] 1529 | 1530 | [[package]] 1531 | name = "serde_repr" 1532 | version = "0.1.16" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" 1535 | dependencies = [ 1536 | "proc-macro2", 1537 | "quote", 1538 | "syn 2.0.31", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "sha1" 1543 | version = "0.10.5" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1546 | dependencies = [ 1547 | "cfg-if", 1548 | "cpufeatures", 1549 | "digest", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "shlex" 1554 | version = "0.1.1" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" 1557 | 1558 | [[package]] 1559 | name = "signal-hook" 1560 | version = "0.3.17" 1561 | source = "registry+https://github.com/rust-lang/crates.io-index" 1562 | checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 1563 | dependencies = [ 1564 | "libc", 1565 | "signal-hook-registry", 1566 | ] 1567 | 1568 | [[package]] 1569 | name = "signal-hook-registry" 1570 | version = "1.4.1" 1571 | source = "registry+https://github.com/rust-lang/crates.io-index" 1572 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1573 | dependencies = [ 1574 | "libc", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "slab" 1579 | version = "0.4.9" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1582 | dependencies = [ 1583 | "autocfg", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "socket2" 1588 | version = "0.4.9" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1591 | dependencies = [ 1592 | "libc", 1593 | "winapi", 1594 | ] 1595 | 1596 | [[package]] 1597 | name = "starship-battery" 1598 | version = "0.7.9" 1599 | source = "registry+https://github.com/rust-lang/crates.io-index" 1600 | checksum = "3336198ad004af4447ae69be4f4e562c26814570f8f0c1e37858405a294e015d" 1601 | dependencies = [ 1602 | "cfg-if", 1603 | "core-foundation", 1604 | "lazycell", 1605 | "libc", 1606 | "mach", 1607 | "nix 0.23.2", 1608 | "num-traits", 1609 | "uom", 1610 | "winapi", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "static_assertions" 1615 | version = "1.1.0" 1616 | source = "registry+https://github.com/rust-lang/crates.io-index" 1617 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1618 | 1619 | [[package]] 1620 | name = "strsim" 1621 | version = "0.8.0" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1624 | 1625 | [[package]] 1626 | name = "strsim" 1627 | version = "0.10.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1630 | 1631 | [[package]] 1632 | name = "syn" 1633 | version = "1.0.109" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1636 | dependencies = [ 1637 | "proc-macro2", 1638 | "quote", 1639 | "unicode-ident", 1640 | ] 1641 | 1642 | [[package]] 1643 | name = "syn" 1644 | version = "2.0.31" 1645 | source = "registry+https://github.com/rust-lang/crates.io-index" 1646 | checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" 1647 | dependencies = [ 1648 | "proc-macro2", 1649 | "quote", 1650 | "unicode-ident", 1651 | ] 1652 | 1653 | [[package]] 1654 | name = "tauri-winrt-notification" 1655 | version = "0.1.2" 1656 | source = "registry+https://github.com/rust-lang/crates.io-index" 1657 | checksum = "4f5bff1d532fead7c43324a0fa33643b8621a47ce2944a633be4cb6c0240898f" 1658 | dependencies = [ 1659 | "quick-xml", 1660 | "windows 0.39.0", 1661 | ] 1662 | 1663 | [[package]] 1664 | name = "tempfile" 1665 | version = "3.8.0" 1666 | source = "registry+https://github.com/rust-lang/crates.io-index" 1667 | checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" 1668 | dependencies = [ 1669 | "cfg-if", 1670 | "fastrand 2.0.0", 1671 | "redox_syscall 0.3.5", 1672 | "rustix 0.38.11", 1673 | "windows-sys 0.48.0", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "termcolor" 1678 | version = "1.2.0" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1681 | dependencies = [ 1682 | "winapi-util", 1683 | ] 1684 | 1685 | [[package]] 1686 | name = "textwrap" 1687 | version = "0.11.0" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1690 | dependencies = [ 1691 | "unicode-width", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "thiserror" 1696 | version = "1.0.48" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" 1699 | dependencies = [ 1700 | "thiserror-impl", 1701 | ] 1702 | 1703 | [[package]] 1704 | name = "thiserror-impl" 1705 | version = "1.0.48" 1706 | source = "registry+https://github.com/rust-lang/crates.io-index" 1707 | checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" 1708 | dependencies = [ 1709 | "proc-macro2", 1710 | "quote", 1711 | "syn 2.0.31", 1712 | ] 1713 | 1714 | [[package]] 1715 | name = "time" 1716 | version = "0.1.45" 1717 | source = "registry+https://github.com/rust-lang/crates.io-index" 1718 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 1719 | dependencies = [ 1720 | "libc", 1721 | "wasi 0.10.0+wasi-snapshot-preview1", 1722 | "winapi", 1723 | ] 1724 | 1725 | [[package]] 1726 | name = "time" 1727 | version = "0.3.28" 1728 | source = "registry+https://github.com/rust-lang/crates.io-index" 1729 | checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" 1730 | dependencies = [ 1731 | "deranged", 1732 | "serde", 1733 | "time-core", 1734 | ] 1735 | 1736 | [[package]] 1737 | name = "time-core" 1738 | version = "0.1.1" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" 1741 | 1742 | [[package]] 1743 | name = "toml" 1744 | version = "0.5.11" 1745 | source = "registry+https://github.com/rust-lang/crates.io-index" 1746 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 1747 | dependencies = [ 1748 | "serde", 1749 | ] 1750 | 1751 | [[package]] 1752 | name = "toml_datetime" 1753 | version = "0.6.3" 1754 | source = "registry+https://github.com/rust-lang/crates.io-index" 1755 | checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" 1756 | 1757 | [[package]] 1758 | name = "toml_edit" 1759 | version = "0.19.14" 1760 | source = "registry+https://github.com/rust-lang/crates.io-index" 1761 | checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" 1762 | dependencies = [ 1763 | "indexmap", 1764 | "toml_datetime", 1765 | "winnow", 1766 | ] 1767 | 1768 | [[package]] 1769 | name = "tracing" 1770 | version = "0.1.37" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1773 | dependencies = [ 1774 | "cfg-if", 1775 | "pin-project-lite", 1776 | "tracing-attributes", 1777 | "tracing-core", 1778 | ] 1779 | 1780 | [[package]] 1781 | name = "tracing-attributes" 1782 | version = "0.1.26" 1783 | source = "registry+https://github.com/rust-lang/crates.io-index" 1784 | checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 1785 | dependencies = [ 1786 | "proc-macro2", 1787 | "quote", 1788 | "syn 2.0.31", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "tracing-core" 1793 | version = "0.1.31" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 1796 | dependencies = [ 1797 | "once_cell", 1798 | ] 1799 | 1800 | [[package]] 1801 | name = "typenum" 1802 | version = "1.16.0" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1805 | 1806 | [[package]] 1807 | name = "uds_windows" 1808 | version = "1.0.2" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" 1811 | dependencies = [ 1812 | "tempfile", 1813 | "winapi", 1814 | ] 1815 | 1816 | [[package]] 1817 | name = "unicode-ident" 1818 | version = "1.0.11" 1819 | source = "registry+https://github.com/rust-lang/crates.io-index" 1820 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 1821 | 1822 | [[package]] 1823 | name = "unicode-width" 1824 | version = "0.1.10" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1827 | 1828 | [[package]] 1829 | name = "uom" 1830 | version = "0.30.0" 1831 | source = "registry+https://github.com/rust-lang/crates.io-index" 1832 | checksum = "e76503e636584f1e10b9b3b9498538279561adcef5412927ba00c2b32c4ce5ed" 1833 | dependencies = [ 1834 | "num-traits", 1835 | "typenum", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "utf8parse" 1840 | version = "0.2.1" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 1843 | 1844 | [[package]] 1845 | name = "v_htmlescape" 1846 | version = "0.15.8" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" 1849 | 1850 | [[package]] 1851 | name = "vcpkg" 1852 | version = "0.2.15" 1853 | source = "registry+https://github.com/rust-lang/crates.io-index" 1854 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1855 | 1856 | [[package]] 1857 | name = "vec_map" 1858 | version = "0.8.2" 1859 | source = "registry+https://github.com/rust-lang/crates.io-index" 1860 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1861 | 1862 | [[package]] 1863 | name = "version_check" 1864 | version = "0.9.4" 1865 | source = "registry+https://github.com/rust-lang/crates.io-index" 1866 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1867 | 1868 | [[package]] 1869 | name = "waker-fn" 1870 | version = "1.1.0" 1871 | source = "registry+https://github.com/rust-lang/crates.io-index" 1872 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 1873 | 1874 | [[package]] 1875 | name = "walkdir" 1876 | version = "2.3.3" 1877 | source = "registry+https://github.com/rust-lang/crates.io-index" 1878 | checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" 1879 | dependencies = [ 1880 | "same-file", 1881 | "winapi-util", 1882 | ] 1883 | 1884 | [[package]] 1885 | name = "wasi" 1886 | version = "0.10.0+wasi-snapshot-preview1" 1887 | source = "registry+https://github.com/rust-lang/crates.io-index" 1888 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1889 | 1890 | [[package]] 1891 | name = "wasi" 1892 | version = "0.11.0+wasi-snapshot-preview1" 1893 | source = "registry+https://github.com/rust-lang/crates.io-index" 1894 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1895 | 1896 | [[package]] 1897 | name = "wasm-bindgen" 1898 | version = "0.2.87" 1899 | source = "registry+https://github.com/rust-lang/crates.io-index" 1900 | checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" 1901 | dependencies = [ 1902 | "cfg-if", 1903 | "wasm-bindgen-macro", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "wasm-bindgen-backend" 1908 | version = "0.2.87" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" 1911 | dependencies = [ 1912 | "bumpalo", 1913 | "log", 1914 | "once_cell", 1915 | "proc-macro2", 1916 | "quote", 1917 | "syn 2.0.31", 1918 | "wasm-bindgen-shared", 1919 | ] 1920 | 1921 | [[package]] 1922 | name = "wasm-bindgen-macro" 1923 | version = "0.2.87" 1924 | source = "registry+https://github.com/rust-lang/crates.io-index" 1925 | checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" 1926 | dependencies = [ 1927 | "quote", 1928 | "wasm-bindgen-macro-support", 1929 | ] 1930 | 1931 | [[package]] 1932 | name = "wasm-bindgen-macro-support" 1933 | version = "0.2.87" 1934 | source = "registry+https://github.com/rust-lang/crates.io-index" 1935 | checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" 1936 | dependencies = [ 1937 | "proc-macro2", 1938 | "quote", 1939 | "syn 2.0.31", 1940 | "wasm-bindgen-backend", 1941 | "wasm-bindgen-shared", 1942 | ] 1943 | 1944 | [[package]] 1945 | name = "wasm-bindgen-shared" 1946 | version = "0.2.87" 1947 | source = "registry+https://github.com/rust-lang/crates.io-index" 1948 | checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" 1949 | 1950 | [[package]] 1951 | name = "wepoll-ffi" 1952 | version = "0.1.2" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" 1955 | dependencies = [ 1956 | "cc", 1957 | ] 1958 | 1959 | [[package]] 1960 | name = "which" 1961 | version = "3.1.1" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" 1964 | dependencies = [ 1965 | "libc", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "winapi" 1970 | version = "0.3.9" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1973 | dependencies = [ 1974 | "winapi-i686-pc-windows-gnu", 1975 | "winapi-x86_64-pc-windows-gnu", 1976 | ] 1977 | 1978 | [[package]] 1979 | name = "winapi-i686-pc-windows-gnu" 1980 | version = "0.4.0" 1981 | source = "registry+https://github.com/rust-lang/crates.io-index" 1982 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1983 | 1984 | [[package]] 1985 | name = "winapi-util" 1986 | version = "0.1.5" 1987 | source = "registry+https://github.com/rust-lang/crates.io-index" 1988 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1989 | dependencies = [ 1990 | "winapi", 1991 | ] 1992 | 1993 | [[package]] 1994 | name = "winapi-x86_64-pc-windows-gnu" 1995 | version = "0.4.0" 1996 | source = "registry+https://github.com/rust-lang/crates.io-index" 1997 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1998 | 1999 | [[package]] 2000 | name = "windows" 2001 | version = "0.10.0" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "a43e544233e20425d5a58e9671cf76d6aed9e6f211508c050facb29b188dc10f" 2004 | dependencies = [ 2005 | "const-sha1", 2006 | "windows_gen", 2007 | "windows_macros", 2008 | ] 2009 | 2010 | [[package]] 2011 | name = "windows" 2012 | version = "0.39.0" 2013 | source = "registry+https://github.com/rust-lang/crates.io-index" 2014 | checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" 2015 | dependencies = [ 2016 | "windows_aarch64_msvc 0.39.0", 2017 | "windows_i686_gnu 0.39.0", 2018 | "windows_i686_msvc 0.39.0", 2019 | "windows_x86_64_gnu 0.39.0", 2020 | "windows_x86_64_msvc 0.39.0", 2021 | ] 2022 | 2023 | [[package]] 2024 | name = "windows" 2025 | version = "0.48.0" 2026 | source = "registry+https://github.com/rust-lang/crates.io-index" 2027 | checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" 2028 | dependencies = [ 2029 | "windows-targets", 2030 | ] 2031 | 2032 | [[package]] 2033 | name = "windows-sys" 2034 | version = "0.42.0" 2035 | source = "registry+https://github.com/rust-lang/crates.io-index" 2036 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 2037 | dependencies = [ 2038 | "windows_aarch64_gnullvm 0.42.2", 2039 | "windows_aarch64_msvc 0.42.2", 2040 | "windows_i686_gnu 0.42.2", 2041 | "windows_i686_msvc 0.42.2", 2042 | "windows_x86_64_gnu 0.42.2", 2043 | "windows_x86_64_gnullvm 0.42.2", 2044 | "windows_x86_64_msvc 0.42.2", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "windows-sys" 2049 | version = "0.48.0" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2052 | dependencies = [ 2053 | "windows-targets", 2054 | ] 2055 | 2056 | [[package]] 2057 | name = "windows-targets" 2058 | version = "0.48.5" 2059 | source = "registry+https://github.com/rust-lang/crates.io-index" 2060 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2061 | dependencies = [ 2062 | "windows_aarch64_gnullvm 0.48.5", 2063 | "windows_aarch64_msvc 0.48.5", 2064 | "windows_i686_gnu 0.48.5", 2065 | "windows_i686_msvc 0.48.5", 2066 | "windows_x86_64_gnu 0.48.5", 2067 | "windows_x86_64_gnullvm 0.48.5", 2068 | "windows_x86_64_msvc 0.48.5", 2069 | ] 2070 | 2071 | [[package]] 2072 | name = "windows_aarch64_gnullvm" 2073 | version = "0.42.2" 2074 | source = "registry+https://github.com/rust-lang/crates.io-index" 2075 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 2076 | 2077 | [[package]] 2078 | name = "windows_aarch64_gnullvm" 2079 | version = "0.48.5" 2080 | source = "registry+https://github.com/rust-lang/crates.io-index" 2081 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2082 | 2083 | [[package]] 2084 | name = "windows_aarch64_msvc" 2085 | version = "0.39.0" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" 2088 | 2089 | [[package]] 2090 | name = "windows_aarch64_msvc" 2091 | version = "0.42.2" 2092 | source = "registry+https://github.com/rust-lang/crates.io-index" 2093 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 2094 | 2095 | [[package]] 2096 | name = "windows_aarch64_msvc" 2097 | version = "0.48.5" 2098 | source = "registry+https://github.com/rust-lang/crates.io-index" 2099 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2100 | 2101 | [[package]] 2102 | name = "windows_gen" 2103 | version = "0.10.0" 2104 | source = "registry+https://github.com/rust-lang/crates.io-index" 2105 | checksum = "bc6283570a39b3594e31c64a498f48058758cc063eb087d972bb6476ad134a16" 2106 | 2107 | [[package]] 2108 | name = "windows_i686_gnu" 2109 | version = "0.39.0" 2110 | source = "registry+https://github.com/rust-lang/crates.io-index" 2111 | checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" 2112 | 2113 | [[package]] 2114 | name = "windows_i686_gnu" 2115 | version = "0.42.2" 2116 | source = "registry+https://github.com/rust-lang/crates.io-index" 2117 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 2118 | 2119 | [[package]] 2120 | name = "windows_i686_gnu" 2121 | version = "0.48.5" 2122 | source = "registry+https://github.com/rust-lang/crates.io-index" 2123 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2124 | 2125 | [[package]] 2126 | name = "windows_i686_msvc" 2127 | version = "0.39.0" 2128 | source = "registry+https://github.com/rust-lang/crates.io-index" 2129 | checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" 2130 | 2131 | [[package]] 2132 | name = "windows_i686_msvc" 2133 | version = "0.42.2" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 2136 | 2137 | [[package]] 2138 | name = "windows_i686_msvc" 2139 | version = "0.48.5" 2140 | source = "registry+https://github.com/rust-lang/crates.io-index" 2141 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2142 | 2143 | [[package]] 2144 | name = "windows_macros" 2145 | version = "0.10.0" 2146 | source = "registry+https://github.com/rust-lang/crates.io-index" 2147 | checksum = "f757e7665f81f33ace9f89b0f0fc3a7c770e24ff4fa1475c6503bb35b4524893" 2148 | dependencies = [ 2149 | "syn 1.0.109", 2150 | "windows_gen", 2151 | ] 2152 | 2153 | [[package]] 2154 | name = "windows_x86_64_gnu" 2155 | version = "0.39.0" 2156 | source = "registry+https://github.com/rust-lang/crates.io-index" 2157 | checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" 2158 | 2159 | [[package]] 2160 | name = "windows_x86_64_gnu" 2161 | version = "0.42.2" 2162 | source = "registry+https://github.com/rust-lang/crates.io-index" 2163 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 2164 | 2165 | [[package]] 2166 | name = "windows_x86_64_gnu" 2167 | version = "0.48.5" 2168 | source = "registry+https://github.com/rust-lang/crates.io-index" 2169 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2170 | 2171 | [[package]] 2172 | name = "windows_x86_64_gnullvm" 2173 | version = "0.42.2" 2174 | source = "registry+https://github.com/rust-lang/crates.io-index" 2175 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 2176 | 2177 | [[package]] 2178 | name = "windows_x86_64_gnullvm" 2179 | version = "0.48.5" 2180 | source = "registry+https://github.com/rust-lang/crates.io-index" 2181 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2182 | 2183 | [[package]] 2184 | name = "windows_x86_64_msvc" 2185 | version = "0.39.0" 2186 | source = "registry+https://github.com/rust-lang/crates.io-index" 2187 | checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" 2188 | 2189 | [[package]] 2190 | name = "windows_x86_64_msvc" 2191 | version = "0.42.2" 2192 | source = "registry+https://github.com/rust-lang/crates.io-index" 2193 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 2194 | 2195 | [[package]] 2196 | name = "windows_x86_64_msvc" 2197 | version = "0.48.5" 2198 | source = "registry+https://github.com/rust-lang/crates.io-index" 2199 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2200 | 2201 | [[package]] 2202 | name = "winnow" 2203 | version = "0.5.15" 2204 | source = "registry+https://github.com/rust-lang/crates.io-index" 2205 | checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" 2206 | dependencies = [ 2207 | "memchr", 2208 | ] 2209 | 2210 | [[package]] 2211 | name = "xdg-home" 2212 | version = "1.0.0" 2213 | source = "registry+https://github.com/rust-lang/crates.io-index" 2214 | checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" 2215 | dependencies = [ 2216 | "nix 0.26.4", 2217 | "winapi", 2218 | ] 2219 | 2220 | [[package]] 2221 | name = "zbus" 2222 | version = "3.14.1" 2223 | source = "registry+https://github.com/rust-lang/crates.io-index" 2224 | checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" 2225 | dependencies = [ 2226 | "async-broadcast", 2227 | "async-executor", 2228 | "async-fs", 2229 | "async-io", 2230 | "async-lock", 2231 | "async-process", 2232 | "async-recursion", 2233 | "async-task", 2234 | "async-trait", 2235 | "blocking", 2236 | "byteorder", 2237 | "derivative", 2238 | "enumflags2", 2239 | "event-listener", 2240 | "futures-core", 2241 | "futures-sink", 2242 | "futures-util", 2243 | "hex", 2244 | "nix 0.26.4", 2245 | "once_cell", 2246 | "ordered-stream", 2247 | "rand", 2248 | "serde", 2249 | "serde_repr", 2250 | "sha1", 2251 | "static_assertions", 2252 | "tracing", 2253 | "uds_windows", 2254 | "winapi", 2255 | "xdg-home", 2256 | "zbus_macros", 2257 | "zbus_names", 2258 | "zvariant", 2259 | ] 2260 | 2261 | [[package]] 2262 | name = "zbus_macros" 2263 | version = "3.14.1" 2264 | source = "registry+https://github.com/rust-lang/crates.io-index" 2265 | checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" 2266 | dependencies = [ 2267 | "proc-macro-crate", 2268 | "proc-macro2", 2269 | "quote", 2270 | "regex", 2271 | "syn 1.0.109", 2272 | "zvariant_utils", 2273 | ] 2274 | 2275 | [[package]] 2276 | name = "zbus_names" 2277 | version = "2.6.0" 2278 | source = "registry+https://github.com/rust-lang/crates.io-index" 2279 | checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" 2280 | dependencies = [ 2281 | "serde", 2282 | "static_assertions", 2283 | "zvariant", 2284 | ] 2285 | 2286 | [[package]] 2287 | name = "zvariant" 2288 | version = "3.15.0" 2289 | source = "registry+https://github.com/rust-lang/crates.io-index" 2290 | checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" 2291 | dependencies = [ 2292 | "byteorder", 2293 | "enumflags2", 2294 | "libc", 2295 | "serde", 2296 | "static_assertions", 2297 | "zvariant_derive", 2298 | ] 2299 | 2300 | [[package]] 2301 | name = "zvariant_derive" 2302 | version = "3.15.0" 2303 | source = "registry+https://github.com/rust-lang/crates.io-index" 2304 | checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" 2305 | dependencies = [ 2306 | "proc-macro-crate", 2307 | "proc-macro2", 2308 | "quote", 2309 | "syn 1.0.109", 2310 | "zvariant_utils", 2311 | ] 2312 | 2313 | [[package]] 2314 | name = "zvariant_utils" 2315 | version = "1.0.1" 2316 | source = "registry+https://github.com/rust-lang/crates.io-index" 2317 | checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" 2318 | dependencies = [ 2319 | "proc-macro2", 2320 | "quote", 2321 | "syn 1.0.109", 2322 | ] 2323 | --------------------------------------------------------------------------------