kino 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96ea3372ae6524dd1243f75354485613d0e49c38005f870bc83c57a46034e579
4
- data.tar.gz: c71ac26d45838d6d5ad573e929ad72612f970799a50686b55324304e65a8daae
3
+ metadata.gz: 19a396c4f03ec64ac1f598ca8563c69122a0db0a543372c629a56e3ed88d8d06
4
+ data.tar.gz: 57c185c402a0f89d0b177c0c017d377abc5fbe8effff999401ae3196426bd6c2
5
5
  SHA512:
6
- metadata.gz: 5f918bd194f00189487a4229f9cffd6005a4b60c6357b21acb6d06e496b9d27ba4487002f8a7fea28f8e2f21324353d3e2fc175e9fcf04906b581d4f2c5309f9
7
- data.tar.gz: 30b42185d524fc97c4f16f13e27573215ff25d5af6f91881ae91a3c8450945c3d380130aec7acf897d19e2707df5a387f62cdcca9513aa34a148960dff5f420b
6
+ metadata.gz: c208de3731186a58be3c4f0ca4f6795fae98405133f0d954ff105a3353892769842cc10bc11fe72dabcaa33c275218e2154eac839cef2fdf729d7959e886429f
7
+ data.tar.gz: 549bd8c04aa00b3e2c799d717a8d5bbeb702530a81ea688948b04535b848f1eb03c8e0f52fc1dca362189a00b01269c06ff1d5993e6f2de8e6d0f1e322132f4b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.5.0] - 2026-08-29
2
+
3
+ - Add opt-in `io_shards true`: accepted HTTP connections can run on
4
+ current-thread Tokio I/O shards instead of Tokio's shared multi-thread
5
+ runtime, reducing scheduler contention on very fast handlers. `io_threads`
6
+ sets the shard count; otherwise Kino uses half the available CPUs
7
+ ([Patrik Wenger](https://github.com/paddor)).
8
+ - Update Rust dependencies: hyper 1.11.1, rb-sys 0.9.130,
9
+ rustls-webpki 0.103.15, among others.
10
+
1
11
  ## [0.4.0] - 2026-08-22
2
12
 
3
13
  - Rack handler: `rails server -u kino` and `rackup -s kino` boot Kino
data/Cargo.lock CHANGED
@@ -80,9 +80,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
80
80
 
81
81
  [[package]]
82
82
  name = "cc"
83
- version = "1.4.2"
83
+ version = "1.4.4"
84
84
  source = "registry+https://github.com/rust-lang/crates.io-index"
85
- checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e"
85
+ checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273"
86
86
  dependencies = [
87
87
  "find-msvc-tools",
88
88
  "shlex 2.0.1",
@@ -147,9 +147,9 @@ dependencies = [
147
147
 
148
148
  [[package]]
149
149
  name = "either"
150
- version = "1.17.0"
150
+ version = "1.18.0"
151
151
  source = "registry+https://github.com/rust-lang/crates.io-index"
152
- checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
152
+ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
153
153
 
154
154
  [[package]]
155
155
  name = "equivalent"
@@ -168,9 +168,9 @@ dependencies = [
168
168
 
169
169
  [[package]]
170
170
  name = "find-msvc-tools"
171
- version = "0.1.10"
171
+ version = "0.1.11"
172
172
  source = "registry+https://github.com/rust-lang/crates.io-index"
173
- checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de"
173
+ checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"
174
174
 
175
175
  [[package]]
176
176
  name = "flume"
@@ -311,9 +311,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
311
311
 
312
312
  [[package]]
313
313
  name = "hyper"
314
- version = "1.11.0"
314
+ version = "1.11.1"
315
315
  source = "registry+https://github.com/rust-lang/crates.io-index"
316
- checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72"
316
+ checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43"
317
317
  dependencies = [
318
318
  "atomic-waker",
319
319
  "bytes",
@@ -407,7 +407,7 @@ dependencies = [
407
407
 
408
408
  [[package]]
409
409
  name = "kino"
410
- version = "0.4.0"
410
+ version = "0.5.0"
411
411
  dependencies = [
412
412
  "ahash",
413
413
  "bytes",
@@ -471,15 +471,15 @@ dependencies = [
471
471
 
472
472
  [[package]]
473
473
  name = "log"
474
- version = "0.4.33"
474
+ version = "0.4.34"
475
475
  source = "registry+https://github.com/rust-lang/crates.io-index"
476
- checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
476
+ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
477
477
 
478
478
  [[package]]
479
479
  name = "lru"
480
- version = "0.18.2"
480
+ version = "0.18.3"
481
481
  source = "registry+https://github.com/rust-lang/crates.io-index"
482
- checksum = "5d2f2f9b4ba7e6b24d95e7e899329d35be83bcded72c8540cdd5368932d1d90a"
482
+ checksum = "0d317b4b9eb398e6acce275758ec6125535505e7a146fb1a9b8bda2451b0ff4c"
483
483
  dependencies = [
484
484
  "hashbrown",
485
485
  ]
@@ -631,18 +631,18 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
631
631
 
632
632
  [[package]]
633
633
  name = "rb-sys"
634
- version = "0.9.128"
634
+ version = "0.9.130"
635
635
  source = "registry+https://github.com/rust-lang/crates.io-index"
636
- checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
636
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
637
637
  dependencies = [
638
638
  "rb-sys-build",
639
639
  ]
640
640
 
641
641
  [[package]]
642
642
  name = "rb-sys-build"
643
- version = "0.9.128"
643
+ version = "0.9.130"
644
644
  source = "registry+https://github.com/rust-lang/crates.io-index"
645
- checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
645
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
646
646
  dependencies = [
647
647
  "bindgen",
648
648
  "lazy_static",
@@ -752,9 +752,9 @@ dependencies = [
752
752
 
753
753
  [[package]]
754
754
  name = "rustls-webpki"
755
- version = "0.103.14"
755
+ version = "0.103.15"
756
756
  source = "registry+https://github.com/rust-lang/crates.io-index"
757
- checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a"
757
+ checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
758
758
  dependencies = [
759
759
  "ring",
760
760
  "rustls-pki-types",
@@ -796,7 +796,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
796
796
  dependencies = [
797
797
  "proc-macro2",
798
798
  "quote",
799
- "syn 3.0.3",
799
+ "syn 3.0.4",
800
800
  ]
801
801
 
802
802
  [[package]]
@@ -861,9 +861,9 @@ dependencies = [
861
861
 
862
862
  [[package]]
863
863
  name = "syn"
864
- version = "3.0.3"
864
+ version = "3.0.4"
865
865
  source = "registry+https://github.com/rust-lang/crates.io-index"
866
- checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
866
+ checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
867
867
  dependencies = [
868
868
  "proc-macro2",
869
869
  "quote",
@@ -887,7 +887,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
887
887
  dependencies = [
888
888
  "proc-macro2",
889
889
  "quote",
890
- "syn 3.0.3",
890
+ "syn 3.0.4",
891
891
  ]
892
892
 
893
893
  [[package]]
@@ -913,7 +913,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
913
913
  dependencies = [
914
914
  "proc-macro2",
915
915
  "quote",
916
- "syn 3.0.3",
916
+ "syn 3.0.4",
917
917
  ]
918
918
 
919
919
  [[package]]
data/README.md CHANGED
@@ -259,6 +259,21 @@ server.shutdown # graceful: drain → deadline → abort straggler
259
259
  always counts as "shareable" (classes are), even if calling it touches
260
260
  unshareable state. Force `:threaded` for those.
261
261
 
262
+ ### Sharded I/O
263
+
264
+ `io_shards true` (off by default) moves HTTP I/O from Tokio's shared
265
+ multi-thread runtime onto current-thread shards: one thread accepts and
266
+ hands each connection to the least-loaded shard, which then owns it for
267
+ its lifetime—no work-stealing, no cross-thread wakeups on the hot path.
268
+ Fast handlers gain double-digit throughput; Ruby-bound endpoints are
269
+ unchanged. Orthogonal to `mode`: it reshapes the Rust side only.
270
+
271
+ ```ruby
272
+ # kino.rb
273
+ io_shards true
274
+ io_threads 4 # optional; default: half the available CPUs
275
+ ```
276
+
262
277
  ## Config file and CLI
263
278
 
264
279
  Settings can live in a Puma-style Ruby DSL file: `kino.rb` in the
data/doc/architecture.md CHANGED
@@ -11,10 +11,13 @@ tokio (Rust threads) Ruby
11
11
  └──────────────────────────┘ └────────────────────────────┘
12
12
  ```
13
13
 
14
- All network I/O lives in Rust on a tokio multi-threaded runtime; hyper
15
- parses HTTP/1.1 and handles keep-alive; rustls terminates TLS. Ruby never
16
- touches a socket. Each request becomes a Rust-side `RequestCtx` pushed to a
17
- bounded flume MPMC queue; Ruby workers pull from it.
14
+ All network I/O lives in Rust on tokio runtimes; hyper parses HTTP/1.1 and
15
+ handles keep-alive; rustls terminates TLS. The default is Tokio's
16
+ multi-thread runtime. With `io_shards true`, one current-thread runtime
17
+ accepts connections and assigns them to current-thread I/O shards, where
18
+ each connection stays for its lifetime. Ruby never touches a socket. Each
19
+ request becomes a Rust-side `RequestCtx` pushed to a bounded flume MPMC
20
+ queue; Ruby workers pull from it.
18
21
 
19
22
  ## Topology
20
23
 
data/ext/kino/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "kino"
3
- version = "0.4.0"
3
+ version = "0.5.0"
4
4
  edition = "2021"
5
5
  authors = ["Yaroslav Markin <yaroslav@markin.net>"]
6
6
  license = "MIT"