Zi is a library for building modern terminal user interfaces.
A user interface in Zi is built as a tree of stateful components. Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.
The App runtime keeps track of components as they are
mounted, updated and eventually removed and only calls view() on those UI
components that have changed and have to be re-rendered. Lower level and
independent of the components, the terminal backend will incrementally
redraw only those parts of the screen that have changed.
A Basic Example
The following is a complete example of a Zi application which implements a
counter. It should provide a good sample of the different
Component methods and how they fit together.
A slightly more complex version which includes styling can be found at
examples/counter.rs.

Anyone familiar with Yew, Elm or React + Redux should be familiar with all
the high-level concepts. Moreover, the names of some types and functions are
the same as in Yew.
use ;
use Result;
// Message type handled by the `Counter` component.
// The `Counter` component.
// Components implement the `Component` trait and are the building blocks of the
// UI in Zi. The trait describes stateful components and their lifecycle.
More examples can be found in the examples directory of the git
repository.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.