mame

Crates.iomame
lib.rsmame
version0.1.4
created_at2024-12-26 00:38:18.454773+00
updated_at2025-08-30 01:20:12.655141+00
descriptionCommon building blocks to build TUI applications.
homepagehttps://github.com/sile/mame
repositoryhttps://github.com/sile/mame
max_upload_size
id1495303
size64,545
Takeru Ohta (sile)

documentation

README

mame

mame Documentation Actions Status License

This library provides common building blocks to build TUI (Terminal User Interface) applications.

"mame (豆)" means "bean" in Japanese. Just like beans are versatile ingredients that can be transformed into countless dishes - from miso soup to tofu, from coffee to chocolate - this library provides flexible, composable components that can be combined to create diverse TUI applications.

Features

Action System

  • Configurable Actions: Define custom actions with JSON/JSONC configuration files
  • Context-Aware Keybindings: Support for multiple input contexts with different keybinding sets
  • Key Matching: Flexible key input parsing supporting modifiers (C-c, M-x), special keys (<UP>, <ENTER>), and printable characters

Terminal Utilities

  • Unicode-Aware Rendering: Proper handling of wide characters (CJK, emojis) and zero-width characters
  • Terminal Frames: Built on tuinix with Unicode width estimation
  • Column Calculation: Accurate display width calculation for international text

UI Components

  • Legend Rendering: Create bordered legend boxes for displaying keybinding help
  • File Preview: Side-by-side file preview panes with automatic layout

Command Execution

  • External Commands: Execute system commands with configurable stdin/stdout/stderr handling
  • Shell Integration: Built-in shell command support with script execution

Configuration

  • JSONC Support: JSON with comments for human-friendly configuration files
  • Variable Resolution: Template variables with environment variable support
Commit count: 277

cargo fmt