biryani is an HTTP/2 server implemented using Ruby Ractor.
The gem is available at rubygems.org. You can install it the following:
$ gem install biryaniThis implementation intentionally provides a minimal API and delegates application-level responsibilities to your code. Roughly, it works as follows:
require 'socket' require 'biryani' port = ARGV[0] || 8888 socket = TCPServer.new(port) server = Biryani::Server.new( # @param _req [Biryani::HTTP::Request] # @param res [Biryani::HTTP::Response] Ractor.shareable_proc do |_req, res| res.status = 200 res.content = 'Hello, world!' end ) server.run(socket)$ curl --http2-prior-knowledge http://localhost:8888 Hello, world!biryani is available as open source under the terms of the MIT License.