Skip to content

Chaoses-Ib/ib-everything

Repository files navigation

ib-everything

Rust/C++ port of voidtools' Everything's IPC/plugin SDK.

Can be used to search user files quickly on Windows.

crates.io Documentation License

Rust port of Everything's IPC SDK.

Features:

  • Support both Everything v1.4 and v1.5, including Alpha version.
  • Higher performance than Everything v1.4's official SDK:
    • Hot query time is about 30% shorter.
    • Sending blocking time is 60% shorter for async queries.
  • Support both sync and async (Tokio) querying.
  • Search text generating utilities.
  • Folder-based batch IPC and cache.

See documentation for details.

Usage

// cargo add everything-ipc
use everything_ipc::wm::{EverythingClient, RequestFlags, Sort};

let everything = EverythingClient::new().expect("not available");

let list = everything
    .query_wait(r"C:\Windows\ *.exe")
    .request_flags(RequestFlags::FileName | RequestFlags::Size | RequestFlags::Path)
    .sort(Sort::SizeDescending)
    .max_results(10)
    .call()
    .expect("query");

println!("Found {} items:", list.len());
println!("{:<25} {:>10}  {}", "Filename", "Size", "Path");
for item in list.iter() {
    // get_string() for String, get_str() for &U16CStr
    let filename = item.get_string(RequestFlags::FileName).unwrap();
    let path = item.get_str(RequestFlags::Path).unwrap().display();
    let size = item.get_size(RequestFlags::Size).unwrap();
    println!("{:<25} {:>10}  {}", filename, size, path);
}
println!("Total: {} items", list.total_len());
/*
Found 5 items:
Filename                        Size  Path
MRT.exe                    223939376  C:\Windows\System32
MRT-KB890830.exe           133315992  C:\Windows\System32
OneDriveSetup.exe           89771848  C:\Windows\WinSxS\amd64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.26100.5074_none_c1340e9ad5f0a5d0
OneDriveSetup.exe           89771848  C:\Windows\System32
OneDriveSetup.exe           60357040  C:\Windows\WinSxS\amd64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.26100.1_none_2233e98c8e9ce5f5
Total: 5742 items
*/

crates.io Documentation License

Rust binding for Everything's plugin SDK.

Features:

  • Load and save config with Serde
  • Make options pages GUI using Winio in MVU (Elm) architecture
  • Internationalization with rust-i18n
  • Log with tracing

Example:

mod options;

#[derive(Serialize, Deserialize, Debug, Default)]
pub struct Config {
    s: String,
}

pub struct App {
    config: Config,
}

impl PluginApp for App {
    type Config = Config;

    fn new(config: Option<Self::Config>) -> Self {
        Self {
            config: config.unwrap_or_default(),
        }
    }

    fn config(&self) -> &Self::Config {
        &self.config
    }

    fn into_config(self) -> Self::Config {
        self.config
    }
}

plugin_main!(App, {
    PluginHandler::builder()
        .name("Test Plugin")
        .description("A test plugin for Everything")
        .author("Chaoses-Ib")
        .version("0.1.0")
        .link("https://github.com/Chaoses-Ib/IbEverythingLib")
        .options_pages(vec![
            OptionsPage::builder()
                .name("Test Plugin")
                .load(ui::winio::spawn::<options::MainModel>)
                .build(),
        ])
        .build()
});

A C++17 implementation of Everything's (IPC) SDK.

Features

  • Higher performance. Compared with the official SDK, it reduces the query time by about 30%.
  • Better asynchronous. Its sending blocking time is only 40% of the SDK. And it is based on std::future, which gives you more features about asynchronous.
  • Support named instances.
  • Header-only and does not depend on the official DLL.

See also

Projects using this library

Everything plugins using this library

Other bindings

Rust bindings (depending on the official DLL) for Everything's (IPC) SDK:

About

Rust/C++ port of voidtools' Everything's IPC/plugin SDK. Can be used to search user files quickly on Windows.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages