7 releases (4 breaking)

0.5.2 Jan 2, 2022
0.5.1 Oct 31, 2021
0.4.0 Oct 25, 2021
0.3.0 Mar 15, 2021
0.1.0 Mar 15, 2021

#839 in Filesystem

21 downloads per month

MIT/Apache

16KB
254 lines

tev-client

Crates.io

This Rust crate implements a IPC TCP client for tev. It enables programmatic control of the images displayed by tev using a convenient and safe Rust api.

Supports all existing tev commands:

Example code:

use tev_client::{TevClient, TevError, PacketCreateImage};

fn main() -> Result<(), TevError> {
    // Spawn a tev instance, this command assumes tev is on the PATH.
    // There are other constructors available too, see TevClient::spawn and TevClient::wrap.
    let mut client = TevClient::spawn_path_default()?;

    // Create a new image
    client.send(PacketCreateImage {
        image_name: "test",
        grab_focus: false,
        width: 1920,
        height: 1080,
        channel_names: &["R", "G", "B"],
    })?;

    Ok(())
}

No runtime deps