Skip to content

Kat404/xoce_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xoce_tools 🦀

📚 Overview

Collection of my personal Rust tools. Designed to be fast, lightweight and minimalist.

🚀 Advantages

  • Minimalist: No heavy dependencies, only the essentials.
  • Lightweight: Optimized code that doesn't bloat your binaries.
  • Fast: Direct and efficient implementations.

📦 Content

Currently includes utilities for console data input:

  • inputstr(text: &str) -> String: Requests a text string from the user.
  • inputall<T>(text: &str) -> T: Requests and automatically converts any data type (integers, floats, booleans, etc.).

🛠️ Mini Tutorial: How to use it in your projects

You can use this library in any other Rust project by adding it directly from your repository (local or remote).

Step 1: Add the dependency

Open the Cargo.toml file of your new project and add xoce_tools in the [dependencies] section.

Option A: Using Git/GitHub (Recommended)

[dependencies]
xoce_tools = { git = "https://github.com/Kat404/xoce_tools.git", branch = "master" }

Option B: Using the library locally (on your same PC) The library must be in the same mother directory that you want to use it in

[dependencies]
xoce_tools = { path = "../xoce_tools" }

Step 2: Use it in your code (main.rs)

use xoce_tools::{inputstr, inputall};

fn main() {
    // Text example
    let name = inputstr("What is your name?");
    println!("Hello, {}!", name);

    // Numbers example (or any other type)
    let age: u32 = inputall("How old are you?");
    println!("You are {} years old.", age);
}

📜 License

This Rust library has a total and completely free (un)license, for more information check more details about Unlicense


About

My personal library for Rust tools

Topics

Resources

License

Stars

Watchers

Forks

Languages