Skip to content
Alexandre Bury edited this page Oct 12, 2016 · 19 revisions

To actually interface with the terminal, Cursive uses a backend library. While this currently defaults to ncurses-rs, a few other backends are available and can be enabled with cargo features.

Available backends

Select a backend

To use a different backend, you will have to disable the default features and enable the desired backend feature.

To run an example from the cursive source code, you can run:

cargo run -v --no-default-features --features pancurses --example select

To select a specific backend in your application:

# Cargo.toml

[dependencies.cursive]
version = "0.3"
default-features = false
features = ["bear-lib-terminal"]

Or you can leave the choice to compilation time, forwarding cursive's features to your own application:

# Cargo.toml

[dependency.cursive]
version = "0.3"
default-features = false

[features]
default = ["ncurses"]
ncurses = ["cursive/ncurses"]
pancurses = ["cursive/pancurses"]
termion = ["cursive/termion"]
bear-lib-terminal = ["cursive/bear-lib-terminal"]
Clone this wiki locally