[package]
edition = "2024"
rust-version = "1.86.0"
name = "tears"
version = "0.8.2"
authors = ["Akiomi Kamakura <akiomik@gmail.com>"]
build = false
exclude = [
".github/",
"scripts/",
".gitignore",
".*.md",
"Cargo.lock",
"clippy.toml",
"flamegraph*.svg",
"justfile",
"tmp*",
"typos.toml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A simple and elegant framework for building TUI applications using The Elm Architecture (TEA)"
homepage = "https://github.com/akiomik/tears"
documentation = "https://docs.rs/tears"
readme = "README.md"
keywords = [
"tui",
"tea",
"elm-architecture",
"ratatui",
"framework",
]
categories = [
"command-line-interface",
"asynchronous",
]
license = "Apache-2.0"
repository = "https://github.com/akiomik/tears"
[features]
default = []
http = [
"dashmap",
"thiserror",
]
native-tls = ["tokio-tungstenite?/native-tls"]
rustls = [
"dep:rustls",
"tokio-tungstenite?/rustls-tls-native-roots",
]
rustls-tls-webpki-roots = [
"dep:rustls",
"tokio-tungstenite?/rustls-tls-webpki-roots",
]
ws = [
"tokio-tungstenite/connect",
"tokio-tungstenite/handshake",
]
[lib]
name = "tears"
path = "src/lib.rs"
[[example]]
name = "counter"
path = "examples/counter.rs"
[[example]]
name = "dashboard"
path = "examples/dashboard.rs"
[[example]]
name = "http_todo"
path = "examples/http_todo.rs"
required-features = ["http"]
[[example]]
name = "signals"
path = "examples/signals.rs"
[[example]]
name = "views"
path = "examples/views.rs"
[[example]]
name = "websocket"
path = "examples/websocket.rs"
required-features = [
"ws",
"rustls",
]
[[test]]
name = "quit_handling"
path = "tests/quit_handling.rs"
[[test]]
name = "runtime_run"
path = "tests/runtime_run.rs"
[[test]]
name = "websocket_leak"
path = "tests/websocket_leak.rs"
[dependencies.color-eyre]
version = "0.6"
[dependencies.crossterm]
version = "0.29"
features = [
"serde",
"event-stream",
]
[dependencies.dashmap]
version = "6"
optional = true
default-features = false
[dependencies.futures]
version = "0.3"
[dependencies.ratatui]
version = "0.30"
features = [
"serde",
"macros",
]
[dependencies.rustls]
version = "0.23"
features = ["ring"]
optional = true
default-features = false
[dependencies.thiserror]
version = "2"
optional = true
default-features = false
[dependencies.tokio]
version = "1"
features = ["full"]
[dependencies.tokio-stream]
version = "0.1"
features = ["sync"]
[dependencies.tokio-tungstenite]
version = "0.29"
optional = true
default-features = false
[dependencies.tokio-util]
version = "0.7"
[dev-dependencies.reqwest]
version = "0.13"
features = [
"json",
"query",
]
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[lints.clippy]
expect_used = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
panic = "warn"
similar_names = "allow"
unwrap_used = "warn"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.complexity]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "warn"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.perf]
level = "warn"
priority = -1
[lints.clippy.suspicious]
level = "warn"
priority = -1