mini_async_repl

Crates.iomini_async_repl
lib.rsmini_async_repl
version0.2.1
sourcesrc
created_at2023-11-30 17:57:30.462978
updated_at2023-11-30 17:57:30.462978
descriptionAn async-first REPL
homepage
repositoryhttps://github.com/mverzilli/mini-async-repl
max_upload_size
id1054340
size89,704
Martin Verzilli (mverzilli)

documentation

README

mini-async-repl crates.io docs.rs

A minimally functional, async-oriented REPL.

This Rust library is meant to help you build a REPL for your application. This work is a derivative from the great easy-repl crate originally authored by Jędrzej Boczar.

We were actually very happy as users of easy-repl, until we stumbled upon the need to await for async commands. So we decided to fork it and re-design the way commands are handled and re-implement the REPL's loop itself so that it awaitable.

Given the complexities of dealing with Rust's type system, borrow checker, and async programming, we decided to drop the macro oriented approach in easy-repl in favor of a somewhat more complex model.

All the rest of the high level features available in easy-repl are equally available to mini-async-repl, eg handy help messages, hints and TAB-completion.

While easy-repl automatically handles validation and parsing of params leveraging its macros, we decided to leave those features out for the first version of this crate. Some utilities for validation and parsing are exposed for the library's user to compose their own handlers instead. See the examples/ directory for more information to learn how to implement different scenarios.

Commit count: 77

cargo fmt