why2 1.4.2

Lightweight, fast, secure, and easy to use encryption system.
Documentation
# This is part of WHY2
# Copyright (C) 2022-2026 Václav Šmejkal

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

[package]
name = "why2"
version = "1.4.2"
authors = ["Václav Šmejkal <engo@satan.red>"]
edition = "2024"
license = "GPL-3.0-only"
repository = "https://git.satan.red/ENGO150/WHY2"
description = "Lightweight, fast, secure, and easy to use encryption system."
keywords = ["encryption", "chat", "security", "rust"]
categories = ["cryptography", "network-programming", "command-line-utilities"]

default-run = "why2"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true

[package.metadata.docs.rs]
features = ["legacy"]
rustdoc-args = ["--html-in-header", "core/docs-header.html"]

[lib]
name = "why2"
path = "core/lib.rs"

[[bin]]
name = "why2"
path = "chat/bin/client/mod.rs"
required-features = ["client"]

[[bin]]
name = "why2-server"
path = "chat/bin/server.rs"
required-features = ["server"]

[features]
default = ["constant-time", "auth"]

constant-time = ["dep:subtle"]
auth = ["dep:hmac"]
legacy = []

chat = [
    "constant-time",
    "auth",
    "dep:serde_json",
    "dep:wincode",
    "dep:ureq",
    "dep:colored",
    "dep:toml_edit",
    "dep:dirs",
    "dep:semver",
    "dep:p521",
    "dep:ml-kem",
    "dep:hmac",
    "dep:hkdf",
]

client = [
    "chat",
    "dep:socks",
    "dep:crossterm",
    "dep:cpal",
    "dep:ringbuf",
    "dep:audiopus",
    "dep:gag",
    "dep:nnnoiseless",
    "dep:lewton",
]

server = [
    "chat",
    "dep:ctrlc",
    "dep:argon2",
    "dep:dashmap",
    "dep:log",
    "dep:simple_logger",
]

[dependencies]
# CORE
rand = "0.9.2"
rand_chacha = "0.9.0"
sha2 = "0.10.9"
rayon = "1.11.0"
zeroize = { version = "1.8.2", features = ["derive"] }
subtle = { version = "2.6.1", optional = true }
hmac = { version = "0.12.1", optional = true }

# CHAT
serde_json = { version = "1.0.149", optional = true }
wincode = { version = "0.2.5", features = ["derive"], optional = true }
colored = { version = "3.1.1", optional = true }
dirs = { version = "6.0.0", optional = true }
p521 = { version = "0.13.3", features = ["ecdh", "pkcs8"], optional = true }
ml-kem = { version = "0.2.1", optional = true }
ureq = { version = "3.1.4", optional = true }
semver = { version = "1.0.27", optional = true }
toml_edit = { version = "0.24.0", optional = true }
hkdf = { version = "0.12.4", optional = true }
socks = { version = "0.3.4", optional = true }

# CHAT (CLIENT SPECIFIC)
crossterm = { version = "0.29.0", optional = true }

# VOICE CHAT (CLIENT)
cpal = { version = "0.17.1", optional = true }
ringbuf = { version = "0.4.8", optional = true }
audiopus = { version = "0.2.0", optional = true }
gag = { version = "1.0.0", optional = true }
nnnoiseless = { version = "0.5.2", default-features = false, optional = true }
lewton = { version = "0.10.2", optional = true }

# CHAT (SERVER SPECIFIC)
argon2 = { version = "0.5.3", optional = true }
ctrlc = { version = "3.5.1", optional = true }
dashmap = { version = "6.1.0", optional = true }
log = { version = "0.4.29", optional = true }
simple_logger = { version = "5.1.0", optional = true }