Sticks: A zero-build, single-binary web runtime combining PHP-style file routing with type safety

Wait 5 sec.

Ten years ago, PHP was practical: drop a file onto a server, add some dynamic logic, and it ran. The downside was that code easily became unmaintainable. Modern Node.js environments improve structure, but introduce thousands of dependencies, bundler configurations, and complex build pipelines for simple websites. I built Sticks to keep the drop-in file routing of PHP, but with compile-time safety and a single executable. How it works: - Distributed as a single static Rust binary with embedded SQLite. - Zero build step, no npm, and no bundlers. - File-based routing matching the files in your public directory. - Templates are scanned and type-checked when the server boots. Syntax errors prevent startup rather than failing at runtime. - Two execution zones: mutations and redirects must occur before the first byte of HTML is emitted. Once HTML starts streaming, the view is strictly read-only. - Blocks cannot be nested, preventing templates from accumulating deep control flow. Example: || on POST: if $req.body.action == "add" { db.exec("INSERT INTO tasks (name) VALUES (?)", [$req.body.name]); redirect("/"); } | || Result $rows = db.all("SELECT * FROM tasks ORDER BY id ASC", []); Json $tasks = $rows.value; | Tasks || for Json $t in $tasks: $t.name ||| else: No tasks yet. | Add The engine is currently an open-source prototype. The project website runs on the binary itself and caches data from the GitHub API using SQLite. Website: https://sticksproject.org Repository: https://github.com/merien-io/sticks Feedback on the syntax and design constraints is welcome.   submitted by   /u/m71nu [link]   [comments]