Collection of my personal Rust tools. Designed to be fast, lightweight and minimalist.
- Minimalist: No heavy dependencies, only the essentials.
- Lightweight: Optimized code that doesn't bloat your binaries.
- Fast: Direct and efficient implementations.
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.).
You can use this library in any other Rust project by adding it directly from your repository (local or remote).
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" }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);
}This Rust library has a total and completely free (un)license, for more information check more details about Unlicense