# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.74.0"
name = "ratatui"
version = "0.29.0"
authors = [
    "Florian Dehau <work@fdehau.com>",
    "The Ratatui Developers",
]
build = false
exclude = [
    "assets/*",
    ".github",
    "Makefile.toml",
    "CONTRIBUTING.md",
    "*.log",
    "tags",
]
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A library that's all about cooking up terminal user interfaces"
homepage = "https://ratatui.rs"
documentation = "https://docs.rs/ratatui/latest/ratatui/"
readme = "README.md"
keywords = [
    "tui",
    "terminal",
    "dashboard",
]
categories = ["command-line-interface"]
license = "MIT"
repository = "https://github.com/ratatui/ratatui"

[package.metadata.docs.rs]
all-features = true
cargo-args = [
    "-Zunstable-options",
    "-Zrustdoc-scrape-examples",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[profile.bench]
lto = true
codegen-units = 1

[lib]
name = "ratatui"
path = "src/lib.rs"
bench = false

[[example]]
name = "async"
path = "examples/async.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "barchart"
path = "examples/barchart.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "barchart-grouped"
path = "examples/barchart-grouped.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "block"
path = "examples/block.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "calendar"
path = "examples/calendar.rs"
doc-scrape-examples = true
required-features = [
    "crossterm",
    "widget-calendar",
]

[[example]]
name = "canvas"
path = "examples/canvas.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "chart"
path = "examples/chart.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "colors"
path = "examples/colors.rs"
doc-scrape-examples = false
required-features = ["crossterm"]

[[example]]
name = "colors_rgb"
path = "examples/colors_rgb.rs"
doc-scrape-examples = true
required-features = [
    "crossterm",
    "palette",
]

[[example]]
name = "constraint-explorer"
path = "examples/constraint-explorer.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "constraints"
path = "examples/constraints.rs"
doc-scrape-examples = false
required-features = ["crossterm"]

[[example]]
name = "custom_widget"
path = "examples/custom_widget.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "demo"
path = "examples/demo/main.rs"
doc-scrape-examples = false

[[example]]
name = "demo2"
path = "examples/demo2/main.rs"
doc-scrape-examples = true
required-features = [
    "crossterm",
    "palette",
    "widget-calendar",
]

[[example]]
name = "docsrs"
path = "examples/docsrs.rs"
doc-scrape-examples = false
required-features = ["crossterm"]

[[example]]
name = "flex"
path = "examples/flex.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "gauge"
path = "examples/gauge.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "hello_world"
path = "examples/hello_world.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "hyperlink"
path = "examples/hyperlink.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "inline"
path = "examples/inline.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "layout"
path = "examples/layout.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "line_gauge"
path = "examples/line_gauge.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "list"
path = "examples/list.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "minimal"
path = "examples/minimal.rs"
doc-scrape-examples = false
required-features = ["crossterm"]

[[example]]
name = "modifiers"
path = "examples/modifiers.rs"
doc-scrape-examples = false
required-features = ["crossterm"]

[[example]]
name = "panic"
path = "examples/panic.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "paragraph"
path = "examples/paragraph.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "popup"
path = "examples/popup.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "ratatui-logo"
path = "examples/ratatui-logo.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "scrollbar"
path = "examples/scrollbar.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "sparkline"
path = "examples/sparkline.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "table"
path = "examples/table.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "tabs"
path = "examples/tabs.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "tracing"
path = "examples/tracing.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "user_input"
path = "examples/user_input.rs"
doc-scrape-examples = true
required-features = ["crossterm"]

[[example]]
name = "widget_impl"
path = "examples/widget_impl.rs"
doc-scrape-examples = true
required-features = [
    "crossterm",
    "unstable-widget-ref",
]

[[test]]
name = "backend_termion"
path = "tests/backend_termion.rs"

[[test]]
name = "state_serde"
path = "tests/state_serde.rs"
required-features = ["serde"]

[[test]]
name = "stylize"
path = "tests/stylize.rs"

[[test]]
name = "terminal"
path = "tests/terminal.rs"

[[test]]
name = "widgets_barchart"
path = "tests/widgets_barchart.rs"

[[test]]
name = "widgets_block"
path = "tests/widgets_block.rs"

[[test]]
name = "widgets_calendar"
path = "tests/widgets_calendar.rs"

[[test]]
name = "widgets_canvas"
path = "tests/widgets_canvas.rs"

[[test]]
name = "widgets_chart"
path = "tests/widgets_chart.rs"

[[test]]
name = "widgets_gauge"
path = "tests/widgets_gauge.rs"

[[test]]
name = "widgets_list"
path = "tests/widgets_list.rs"

[[test]]
name = "widgets_paragraph"
path = "tests/widgets_paragraph.rs"

[[test]]
name = "widgets_table"
path = "tests/widgets_table.rs"

[[test]]
name = "widgets_tabs"
path = "tests/widgets_tabs.rs"

[[bench]]
name = "main"
path = "benches/main.rs"
harness = false

[dependencies.bitflags]
version = "2.3"

[dependencies.cassowary]
version = "0.3"

[dependencies.compact_str]
version = "0.8.0"

[dependencies.crossterm]
version = "0.28.1"
optional = true

[dependencies.document-features]
version = "0.2.7"
optional = true

[dependencies.indoc]
version = "2"

[dependencies.instability]
version = "0.3.1"

[dependencies.itertools]
version = "0.13"

[dependencies.lru]
version = "0.12.0"

[dependencies.palette]
version = "0.7.6"
optional = true

[dependencies.paste]
version = "1.0.2"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.strum]
version = "0.26.3"
features = ["derive"]

[dependencies.termwiz]
version = "0.22.0"
optional = true

[dependencies.time]
version = "0.3.11"
features = ["local-offset"]
optional = true

[dependencies.unicode-segmentation]
version = "1.10"

[dependencies.unicode-truncate]
version = "1"

[dependencies.unicode-width]
version = "=0.2.0"

[dev-dependencies.argh]
version = "0.1.12"

[dev-dependencies.color-eyre]
version = "0.6.2"

[dev-dependencies.criterion]
version = "0.5.1"
features = ["html_reports"]

[dev-dependencies.crossterm]
version = "0.28.1"
features = ["event-stream"]

[dev-dependencies.fakeit]
version = "1.1"

[dev-dependencies.font8x8]
version = "0.3.1"

[dev-dependencies.futures]
version = "0.3.30"

[dev-dependencies.indoc]
version = "2"

[dev-dependencies.octocrab]
version = "0.41.0"

[dev-dependencies.pretty_assertions]
version = "1.4.0"

[dev-dependencies.rand]
version = "0.8.5"

[dev-dependencies.rand_chacha]
version = "0.3.1"

[dev-dependencies.rstest]
version = "0.23.0"

[dev-dependencies.serde_json]
version = "1.0.109"

[dev-dependencies.tokio]
version = "1.39.2"
features = [
    "rt",
    "macros",
    "time",
    "rt-multi-thread",
]

[dev-dependencies.tracing]
version = "0.1.40"

[dev-dependencies.tracing-appender]
version = "0.2.3"

[dev-dependencies.tracing-subscriber]
version = "0.3.18"
features = ["env-filter"]

[features]
all-widgets = ["widget-calendar"]
crossterm = ["dep:crossterm"]
default = [
    "crossterm",
    "underline-color",
]
macros = []
palette = ["dep:palette"]
scrolling-regions = []
serde = [
    "dep:serde",
    "bitflags/serde",
    "compact_str/serde",
]
termion = ["dep:termion"]
termwiz = ["dep:termwiz"]
underline-color = ["dep:crossterm"]
unstable = [
    "unstable-rendered-line-info",
    "unstable-widget-ref",
    "unstable-backend-writer",
]
unstable-backend-writer = []
unstable-rendered-line-info = []
unstable-widget-ref = []
widget-calendar = ["dep:time"]

[target."cfg(not(windows))".dependencies.termion]
version = "4.0.0"
optional = true

[lints.clippy]
as_underscore = "warn"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
deref_by_slicing = "warn"
else_if_without_else = "warn"
empty_line_after_doc_comments = "warn"
equatable_if_let = "warn"
fn_to_numeric_cast_any = "warn"
format_push_string = "warn"
map_err_ignore = "warn"
missing_const_for_fn = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
mixed_read_write_in_expression = "warn"
mod_module_files = "warn"
module_inception = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_pass_by_ref_mut = "warn"
needless_raw_strings = "warn"
or_fun_call = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
string_to_string = "warn"
unnecessary_self_imports = "warn"
use_self = "warn"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
unsafe_code = "forbid"
