kino 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a4e73026c9f3087a58234e0f8fc88be1e407bb7435e8e8a0be43d087f318bcad
4
+ data.tar.gz: 49581091f865d3ff11227900376ad9499d1bddef77a4b3b0bc5b3b7405d58bd8
5
+ SHA512:
6
+ metadata.gz: 3e420380536f5c73a417d20945ad49f7f0a8e46d3cec5feabfde50600aab9dfc18b2e16d64656b2e1529e5e2c08384efabf4be9f36bebfb9cc737a245e348aec
7
+ data.tar.gz: f0e38db0ea8bb93cfa7825db47ebcf72319e76ac82487ed6efb191d82db86a8c205899f7996f34976b36d1960dd97f3086fa4a5359179ce8c7f35bfa5d8b94f4
data/.yardopts ADDED
@@ -0,0 +1,14 @@
1
+ --readme README.md
2
+ --markup markdown
3
+ --title "Kino"
4
+ --output-dir doc/api
5
+ --no-private
6
+ --embed-mixins
7
+ lib/**/*.rb
8
+ -
9
+ doc/why-kino.md
10
+ doc/architecture.md
11
+ doc/benchmarks.md
12
+ doc/rails-on-ractors.md
13
+ CHANGELOG.md
14
+ LICENSE.txt
data/CHANGELOG.md ADDED
@@ -0,0 +1,54 @@
1
+ ## [0.1.0] - 2026-06-11
2
+
3
+ Initial release.
4
+
5
+ - HTTP/1.1 server with all network I/O in Rust on tokio + hyper.
6
+ - Worker **Ractors** for true parallel request handling (`mode: :ractor`,
7
+ requires a Ractor-shareable app), with a threaded fallback (`mode: :threaded`)
8
+ that runs any Rack app, Rails included. Puma-style `workers × threads`
9
+ topology in both modes.
10
+ - Rack 3 spec compliance verified by Rack::Lint over real sockets: streaming
11
+ request bodies (forward-only `rack.input`), enumerable and callable
12
+ (full-duplex stream) response bodies, lowercase/multi-value headers.
13
+ - Supervised crash recovery: a dying ractor 500s its in-flight requests
14
+ immediately and is respawned.
15
+ - Graceful shutdown: drain to deadline, then abort in-flight clients and
16
+ reap workers; second signal force-exits.
17
+ - Bounded request queue with 503 backpressure; bounded body channels give
18
+ per-request backpressure in both directions with the GVL released.
19
+ - TLS via rustls (file paths or inline PEM).
20
+ - Near-zero-allocation env construction: frozen LRU caches for
21
+ Host/peer-address values, shared frozen `rack.errors`, and a shared
22
+ frozen null `rack.input` for bodyless requests.
23
+ - The Rust side allocates through mimalloc (chosen over jemalloc in a three-way benchmark).
24
+ - Fused worker loop: the env arrives with the request handle embedded
25
+ (`env["kino.request"]`) and the common complete-body response rides a
26
+ single respond-and-take native call—~one FFI crossing per request,
27
+ no per-request arrays. Opt-in `batch` directive for grabbing several
28
+ queued requests per visit (default 1; >1 trades fairness for
29
+ throughput).
30
+ - Experimental `lanes` mode: per-worker queues with awake-preferring
31
+ dispatch and work stealing (+20% ractor-mode plaintext on Linux,
32
+ making ractor the fastest Kino configuration on real hardware). Off
33
+ by default.
34
+ - Live stats: `server.stats` (queued, in-flight, served, rejected,
35
+ respawns, lane depths) and a `SIGUSR1` one-line dump for CLI servers.
36
+ - Native async logging: a `log_requests` access log (status-colored on
37
+ color terminals—2xx green, 3xx yellow, 4xx maroon, 5xx bright red—503
38
+ rejections included) and `Kino::Logger` / `Kino::Logger::Device`—lines
39
+ flow through a lock-free channel to a Rust flusher thread, so
40
+ request threads never take a log mutex or issue a write syscall. The
41
+ device is Ractor-shareable.
42
+ - `kino --check` (and `Kino::Check.report`): explains why an app is not
43
+ Ractor-shareable—captured variables with definition sites, ivar
44
+ paths, and the class-ivar trap—without freezing anything.
45
+ - Puma-style Ruby DSL config file (`kino.rb`) and a `kino` CLI
46
+ (`kino -C kino.rb config.ru`); precedence kwargs > file > defaults.
47
+ Directives include `environment`, `pidfile`, and `rackup`.
48
+ - Hot-path performance work: a GVL-free queue fast path, zero-copy response
49
+ headers, a frozen Ractor-shareable env-string cache, and no per-request
50
+ task spawns. Single-process throughput is on par with (or modestly above)
51
+ a same-topology process cluster in our benchmarks; see README.
52
+ - Request timeouts: `request_timeout: seconds` (off by default) returns an
53
+ immediate 504 when the app misses the deadline; the late response is
54
+ dropped and the handler is never killed. Counted as `stats[:timeouts]`.