Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 186 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

70 changes: 3 additions & 67 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 44 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,65 @@ description = "Single-binary, zero-setup static site hosting appliance with Tor
license = "MIT"
authors = []

[lib]
name = "rusthost"
path = "src/lib.rs"

[[bin]]
name = "rusthost-cli"
path = "src/main.rs"

[dependencies]
# Async runtime — drives the server, console, and all I/O
tokio = { version = "1", features = ["full"] }

# ─── Arti (in-process Tor) ────────────────────────────────────────────────────
#
# arti-client — the high-level Tor client API (bootstrap, launch onion service)
# tokio — use Tokio as the async runtime (default, required)
# native-tls — TLS backend for connecting to Tor relays (default)
# onion-service-service — enables hosting (serving) onion services
# ─── Lint configuration ───────────────────────────────────────────────────────
#
# tor-hsservice — lower-level onion service types:
# handle_rend_requests, OnionServiceConfigBuilder, StreamRequest
#
# futures — StreamExt trait for iterating over the stream of StreamRequests
# clippy::all — every lint in the default set (correctness + style + perf)
# clippy::pedantic — stricter style + API lints; individual allows used where
# the rule conflicts with the module's documented design
# (e.g. too_many_arguments for the HTTP write_* stack which
# must mirror the HTTP/1.1 wire format).
[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
# nursery lints warn but do not gate CI; they surface improvement candidates.
nursery = { level = "warn", priority = -1 }

[dependencies]
tokio = { version = "1", features = [
"rt-multi-thread",
"net",
"io-util",
"fs",
"sync",
"time",
"macros",
"signal",
] }

arti-client = { version = "0.40", features = [
"tokio",
"native-tls",
"onion-service-service",
] }
tor-hsservice = { version = "0.40" }
# tor-cell: needed to construct the Connected message passed to StreamRequest::accept()
tor-cell = { version = "0.40" }
futures = "0.3"
tor-cell = { version = "0.40" }
futures = "0.3"

# Onion-address encoding (used by the tor module to format HsId → ${base32}.onion)
# sha3: provides SHA3-256 for the v3 address checksum
# data-encoding: provides RFC 4648 base32 (no-padding, uppercase/lowercase)
sha3 = "0.10"
sha3 = "0.10"
data-encoding = "2"
thiserror = "1"
serde = { version = "1", features = ["derive"] }
toml = "0.8"
log = "0.4"
crossterm = "0.27"
chrono = { version = "0.4", features = ["clock"] }
# OS error codes used in the accept-loop backoff to distinguish EMFILE/ENFILE
# (resource exhaustion → log error) from transient errors (log debug).
libc = "0.2"

# Configuration — TOML parsing and typed deserialization
serde = { version = "1", features = ["derive"] }
toml = "0.8"

# Logging — standard facade used by all modules
log = "0.4"

# Terminal — cross-platform raw mode, cursor control, key events
crossterm = "0.27"

# Timestamps — used in log formatting
chrono = { version = "0.4", features = ["clock"] }

# Signal handling — catches SIGINT / SIGTERM for graceful shutdown
ctrlc = "3"
[dev-dependencies]
tempfile = "3"

[profile.release]
opt-level = 3
Expand Down
Loading
Loading