Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Alexandre Bury edited this page Jul 1, 2024 · 19 revisions

To actually interface with the terminal, Cursive uses a backend library. While this currently defaults to crossterm, 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-backend --example select

To select a specific backend in your application:

# Cargo.toml

[dependencies.cursive]
version = "0.20"
default-features = false
features = ["blt-backend"]

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

# Cargo.toml

[dependencies.cursive]
version = "0.20"
default-features = false

[features]
default = ["ncurses-backend"]
ncurses-backend = ["cursive/ncurses-backend"]
pancurses-backend = ["cursive/pancurses-backend"]
termion-backend = ["cursive/termion-backend"]
crossterm-backend = ["cursive/crossterm-backend"]
blt-backend = ["cursive/blt-backend"]

Linking with BearLibTerminal.lib on Windows

You need BearLibTerminal.lib file (to be downloaded on BearLibTerminal homepage) and copy it to

C:\Users\{Your Username}.multirust\toolchains\{current toolchain}\lib\rustlib\{current toolchain}\lib

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.