rusty-man/Cargo.toml
Robin Krahl 8db34e33b2
Use termion backend for cursive
With this patch, we replace cursive’s default ncurses backend with the
termion backend.  This has multiple reasons:
- The ncurses backend has safety issues, see [0].
- ncurses requires a pre-installed library and a C compiler, introducing
  additional build dependencies.  Termion is implemented in Rust only.
- ncurses does not work on Windows, while termion works in all terminals
  that support ANSI escape codes.

Per default, the termion backend does not buffer the output which may
cause flickering [1].  Therefore, we also use the
cursive_buffered_backend that buffers the output and fixes the
flickering problem.

[0] https://github.com/gyscos/cursive/issues/488
[1] https://github.com/gyscos/cursive/issues/142
2020-10-08 10:30:17 +02:00

71 lines
1.6 KiB
TOML

# SPDX-FileCopyrightText: 2020 Robin Krahl <robin.krahl@ireas.org>
# SPDX-License-Identifier: CC0-1.0
[package]
name = "rusty-man"
version = "0.3.0"
authors = ["Robin Krahl <robin.krahl@ireas.org>"]
edition = "2018"
description = "Command-line viewer for rustdoc documentation"
homepage = "https://sr.ht/~ireas/rusty-man"
repository = "https://git.sr.ht/~ireas/rusty-man"
keywords = ["doc", "cli", "rustdoc"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
license = "MIT"
exclude = [".builds/*", "tests/html/*", "tests/snapshots/*"]
[dependencies]
ansi_term = "0.12.1"
anyhow = "1.0.31"
atty = "0.2.14"
cursive_buffered_backend = "0.4"
cursive-markup = "0.1"
html2text = "0.2.1"
kuchiki = "0.8.0"
log = "0.4.11"
markup5ever = "0.10.0"
merge = "0.1.0"
pager = "0.15.0"
serde_json = "1.0.56"
serde_tuple = "0.5.0"
terminal_size = "0.1.13"
textwrap = "0.12.1"
toml = "0.5.6"
url = "2.1.1"
webbrowser = "0.5.5"
xdg = "2.2.0"
[dependencies.cursive]
version = "0.15"
default-features = false
features = ["termion-backend"]
[dependencies.env_logger]
version = "0.7.1"
default-features = false
[dependencies.serde]
version = "1.0.114"
features = ["derive"]
[dependencies.structopt]
version = "0.3.15"
default-features = false
[dependencies.syntect]
version = "4.3.0"
default-features = false
features = ["parsing", "regex-onig", "assets", "dump-load"]
[dependencies.text-style]
version = "0.2.0"
features = ["ansi_term", "cursive", "syntect"]
[dev-dependencies]
assert_cmd = "1.0.1"
insta = "0.16.1"
rustc_version = "0.2.3"
semver = "0.9.0"
tempfile = "3.1.0"