Download Latest Version v1.10.1 source code.tar.gz (75.9 kB)
Email in envelope

Get an email when there's a new version of Kemal

Home / v1.10.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-03-03 3.2 kB
v1.10.0 source code.tar.gz 2026-03-03 75.6 kB
v1.10.0 source code.zip 2026-03-03 107.2 kB
Totals: 3 Items   186.0 kB 0

This is the biggest Kemal release ever with new features and a lot of improvements 🎉

  • Add modular Kemal::Router with namespaced routing, scoped filters, WebSocket support and flexible mounting while keeping the existing DSL fully compatible #731. Thanks @sdogruyol :pray:

    :::crystal require "kemal"

    api = Kemal::Router.new

    api.namespace "/users" do get "/" do |env| env.json({users: ["alice", "bob"]}) end

    get "/:id" do |env| env.text "user #{env.params.url["id"]}" end end

    mount "/api/v1", api

    Kemal.run

  • Add use keyword for registering global and path-specific middleware, including support for arrays and insertion at a specific position in the handler chain #734. Thanks @sdogruyol :pray:

    :::crystal require "kemal"

    Path-specific middlewares for /api routes

    use "/api", [CORSHandler.new, AuthHandler.new]

    get "/" do "Public home" end

    get "/api/users" do |env| env.json({users: ["alice", "bob"]}) end

    Kemal.run

  • Enhance response helpers to provide chainable JSON/HTML/text/XML helpers, HTTP::Status support and the ability to halt execution from a chained response for concise API error handling #733, #735, #736. Thanks @sdogruyol and @mamantoha :pray:

    :::crystal require "kemal"

    get "/users" do |env| # Default JSON response env.json({users: ["alice", "bob"]}) end

    post "/users" do |env| # Symbol-based HTTP::Status and chained JSON env.status(:created).json({id: 1, created: true}) end

    get "/admin" do |env| # Halt immediately with HTML response halt env.status(403).html("

    Forbidden

    ") end

    get "/api/users" do |env| # Custom content type (JSON:API) env.json({data: ["alice", "bob"]}, content_type: "application/vnd.api+json") end

    Kemal.run

  • Ensure global wildcard filters always execute while keeping namespace filters isolated to their routes #737. Thanks @mamantoha :pray:

  • Fix CLI SSL validation and expand CLI option parsing specs #738. Thanks @sdogruyol :pray:
  • Make route LRU cache concurrency-safe with Mutex #739. Thanks @sdogruyol :pray:
  • Add raw_body to ParamParser for multi-handler body access (e.g. kemal-session) #740. Thanks @sdogruyol :pray:

    :::crystal post "/" do |env| raw = env.params.raw_body # raw body, multiple handlers can call it env.params.body["name"] # parsed body end

  • Fix OverrideMethodHandler route cache bug when using _method override #741, #742. Thanks @skojin and @sdogruyol :pray:

Source: README.md, updated 2026-03-03