A simple, modular router for Ruby web applications inspired by Rum and Cuba.
Syro is a simple, lightweight router for Ruby web applications built on Rack. It provides a clean API for defining routes, handling HTTP methods, and structuring modular applications with sub-routers. It solves the need for a minimal, performant routing layer without the overhead of a full framework.
Ruby developers building lightweight web applications or micro-frameworks who prefer minimal, modular routing over heavier solutions like Rails.
Developers choose Syro for its simplicity, performance, and modular design. It offers just enough abstraction to be productive while staying close to Rack, making it ideal for custom web stacks or when you need fine-grained control over routing logic.
Simple router for web applications
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports sub-applications that can be dispatched without performance overhead, enabling clean separation of concerns as shown in the modular example with Admin and App routers.
Provides intuitive methods like `on` for path matching/capturing and dedicated HTTP verb methods (e.g., `get`, `post`), making route definitions straightforward and readable.
Allows extending the routing sandbox with custom methods through Syro::Deck subclasses, promoting code reuse and flexibility, as demonstrated in the TextualDeck example.
Built on Rack with minimal abstraction and no unnecessary dependencies, ensuring low overhead and fast routing, aligning with its minimalist philosophy.
Lacks any security features; the README explicitly states 'There are no security features built into this routing library,' requiring developers to implement protection mechanisms from scratch.
Does not support Rack middleware out of the box; must use Rack::Builder for setup, adding complexity and boilerplate for common middleware needs like sessions or logging.
No templating or rendering helpers; developers must handle content types and encodings manually, as seen in the Content Type section where res.json requires manual JSON.dump.