7 releases

✓ Uses Rust 2018 edition

new 0.3.4 Apr 16, 2019
0.3.3 Apr 13, 2019
0.3.1 Mar 7, 2019
0.3.0 Jan 25, 2019
0.1.0 Jan 14, 2019

#93 in Command-line interface

Download history 4/week @ 2019-01-08 19/week @ 2019-01-15 17/week @ 2019-01-22 1/week @ 2019-01-29 4/week @ 2019-02-19 9/week @ 2019-02-26 21/week @ 2019-03-05 7/week @ 2019-03-12 10/week @ 2019-03-19 20/week @ 2019-03-26 6/week @ 2019-04-02 42/week @ 2019-04-09

51 downloads per month
Used in 1 crate

MIT/Apache

111KB
3K SLoC

Interact is a framework for friendly online introspection of the running program state in an intuitive command-line interactive way.

Please go to the homepage for more details.


lib.rs:

Interact

Interact is a framework for friendly online introspection of the running program state in an intuitive command-line interactive way.

While dynamically-typed interpreted languages offer the advantage of allowing to look at a running program state using a prompt, compiled languages often do not provide that feature. Being hard as it is to introduce interpreters into compiled languages, the Interact project aimes to provide a midway solution using stable Rust.

Usage

NOTE: Unless you are manually extending types for use under Interact, you probably don't need most of the items that are exported in this crate. Instead, look for the interact_prompt crate.

Design

Interact introduces a series of traits, the main ones are Access and Deser trait. Those crates can be custom-derived using #[derive(Interact)], or be derived manually.

The Access provides two methods that return special accessor trait object types. Please read the documentation for the access part of Interact.

The Deser trait is a special deserializer that allows for online interactive hints at non-ambiguous parse points.

Further relevent bits that comprise Interact are:

  • reflector, when provided at type it will generate a representation of it, while handling reference cycles, imposed output limitations, mutexs, and customized in-process indirections.
  • climber, which when given a Rust-like expression of an inner value, knows how to go from an Interact root down to a field.

Dependencies

~2.5MB
~50K SLoC