A micro-library for simple keyboard input in Rust. No extra code — just input and get values!
simple_input is a tiny wrapper library over Rust's standard I/O. It allows you to easily get numbers and strings from users without writing verbose boilerplate code every time.
- 🎯 Minimalism — Only 3 functions for everything
- 🔄 Ready to use — Parses and returns data immediately
- 📦 Lightweight — Zero extra dependencies
- 🔌 Simple integration — Add to
Cargo.tomland go
- Add the library to your project
- Call the desired input function
- Use the received value
[dependencies]
simple_input = { git = "https://github.com/FelineFantasy/ask_input.git" }git clone https://github.com/FelineFantasy/ask_input.gituse simple_input;
let number = simple_input::get_number::<i32>();
let text = simple_input::get_string();get_number<T>()— Gets a number of type T from inputget_string()— Gets a string from inputget_number_range<T>(min, max)— Gets a number within a range
- Rust 1.70+
- Cargo
FelineFantasy
License: MIT