min-tun 0.1.2

A Rust library for finding the minimum available TUN device on Linux systems.
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 4.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • inceabdullah/min-tun
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • inceabdullah

min-tun

Description

min-tun is a Rust library for finding the minimum available TUN device on Linux systems. This crate provides a simple and reliable way to determine which TUN device names are available for use.

Prerequisites

  • Rust programming language
  • Cargo package manager

Building the Crate

To build the crate, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/min-tun.git
    

    Replace yourusername with your actual GitHub username and min-tun with your repository name if different.

  2. Navigate into the project directory:

    cd min-tun
    
  3. Build the crate:

    cargo build
    

Using the Crate in Your Rust Project

To use min-tun in your Rust project, you need to include it as a dependency in your Cargo.toml:

[dependencies]
min-tun = "0.1.0"  # Replace with the actual version number if different

After adding the dependency, you can use the crate in your code. Here's a simple example:

// main.rs

fn main() {
    match min_tun::find_min_available_tun() {
        Some(tun_name) => println!("Minimum available tun device: {}", tun_name),
        None => println!("Could not find an available tun device"),
    }
}

To build and run your project, execute:

cargo build
cargo run

License

This project is licensed under the MIT License - see the LICENSE file for details.