input_method 0.1.0

A tiny Rust crate that provides a Python-like input() function for CLI apps.
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 3.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 983.67 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • had2020/input_method
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • had2020

input_method

MSRV crates.io Downloads

A tiny, opinionated Rust crate that brings a Python-style input method to your CLI apps. Ideal for quick scripts, REPLs, and simple text-based interactions.

📦 Purpose

This crate exists to provide one simple function: read user input from stdin, with an optional prompt. That’s it. Just like Python’s input().

Perfect for:

  • Quick scripts and prototypes ⚡
  • Fast little CLI tools 🛠️
  • School exercises and coding challenges 🧠

🚀 Usage

Add it to your Cargo.toml:

cargo add input_method

Basic usage

use input_method::input;

fn main() {
    println!("What is your name!");
    let name = input();
    println!("Hello, {}", name);
}

Features

  • Simple and ergonomic
  • No dependencies (just std :C)
  • Works out-of-the-box on Unix based platforms
  • Minimal footprint (zero config)

See Github for Up To Date Docs

Leave a star to be a star! ⭐

PRs welcome, keep it simple.