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.
20 lines
415 B
TOML
20 lines
415 B
TOML
[workspace]
|
|
members = ["furst-read", "furst-serve"]
|
|
|
|
[package]
|
|
name = "furst"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "Route URLs to the cheapest tool that can handle them"
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
strip = true
|