Ошибка в запуске кода из документации Cursive

Хочу попробовать крэйт Cursivе, но вылазит ошибка
Вот код
main.rs

use cursive::views::{Dialog, TextView};

fn main() {
    // Creates the cursive root - required for every application.
    let mut siv = cursive::default();

    // Creates a dialog with a single "Quit" button
    siv.add_layer(Dialog::around(TextView::new("Hello Dialog!"))
                         .title("Cursive")
                         .button("Quit", |s| s.quit()));

    // Starts the event loop.
    siv.run();
}

cargo.toml

[package]
name = "guicli"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

cursive = "0.19"

при запуске через консоль

error: failed to run custom build command for `ncurses v5.101.0`

Caused by:
  process didn't exit successfully: `D:\failes\все\scripts\rust2\guicli\target\debug\build\ncurses-aa98035ca1793f87\build-script-build` (exit code: 101)
  --- stderr
  cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
  thread 'main' panicked at 'assertion failed: command.status().expect(\"compilation failed\").success()', C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\ncurses-5.101.0\build.rs:105:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Буду крайне благодарен за любую помощь!


Ответы (1 шт):

Автор решения: Kalashnikov Alexander

Cursive зависит от ncurses: это C-библиотека для управления терминалом. Нужно установить её. Для Fedora sudo dnf install ncurses-devel.

→ Ссылка