Furst/furst-serve/Cargo.toml
nak0x 76d0906564 Add furst-serve, a local reader server
Following a link inside an extracted article used to drop the reader back
onto the live site. The server rewrites in-page links to /read?u=... so
browsing stays in reader mode, and caches rendered pages on disk, which
takes a revisit from ~350ms to under a millisecond.

The HTTP layer is blocking and hand-rolled: GET only, one response per
connection, a fixed pool of four worker threads so memory stays
predictable, and nothing but the loopback interface is ever bound.

Routes so far:

  /            home, from ~/.config/furst/home.toml
  /read?u=     the article, with links routed back through the reader
  /go?u=       hand the original URL to the heavy browser

Pages that are not documents redirect to the original rather than being
run through an article extractor, and pages with too little text to be an
article say so and offer the escape hatches. Redirect stubs are followed
before that judgement is made.

furst-serve --open ensures a server is running, starting a detached one if
needed, then execs a browser at the reader URL. Cache entries carry a
schema number so a renderer change drops them rather than serving stale
markup.
2026-09-06 19:55:59 +02:00

15 lines
375 B
TOML

[package]
name = "furst-serve"
version = "0.1.0"
edition = "2024"
description = "Local reader server: browse the web without a browser engine"
[dependencies]
furst-read = { path = "../furst-read" }
scraper = "0.23"
serde = { version = "1", features = ["derive"] }
toml = { version = "0.8", default-features = false, features = ["parse"] }
[profile.release]
opt-level = "s"