pigeonhole-db 1.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.
Files changed (1256) hide show
  1. checksums.yaml +7 -0
  2. data/Cargo.lock +899 -0
  3. data/Cargo.toml +45 -0
  4. data/LICENSE +21 -0
  5. data/README.md +22 -0
  6. data/extconf.rb +12 -0
  7. data/lib/pigeonhole/api.rb +615 -0
  8. data/lib/pigeonhole/index.rb +208 -0
  9. data/lib/pigeonhole/memory.rb +507 -0
  10. data/lib/pigeonhole/version.rb +6 -0
  11. data/lib/pigeonhole-db.rb +6 -0
  12. data/lib/pigeonhole.rb +47 -0
  13. data/sig/pigeonhole.rbs +1484 -0
  14. data/src/budget.rs +205 -0
  15. data/src/classes.rs +279 -0
  16. data/src/convert.rs +192 -0
  17. data/src/db.rs +685 -0
  18. data/src/error.rs +151 -0
  19. data/src/feed.rs +316 -0
  20. data/src/fork.rs +64 -0
  21. data/src/gvl.rs +112 -0
  22. data/src/index.rs +1157 -0
  23. data/src/lib.rs +534 -0
  24. data/src/memory.rs +2178 -0
  25. data/src/read.rs +312 -0
  26. data/src/table.rs +1161 -0
  27. data/src/vector.rs +262 -0
  28. data/src/walk.rs +406 -0
  29. data/vendor/bundle/ruby/3.4.0/bin/minitest +29 -0
  30. data/vendor/bundle/ruby/3.4.0/bin/rake +29 -0
  31. data/vendor/bundle/ruby/3.4.0/bin/rake-compiler +29 -0
  32. data/vendor/bundle/ruby/3.4.0/bin/rake-compiler-dock +29 -0
  33. data/vendor/bundle/ruby/3.4.0/bin/rb-sys-dock +29 -0
  34. data/vendor/bundle/ruby/3.4.0/bin/rbs +29 -0
  35. data/vendor/bundle/ruby/3.4.0/cache/drb-2.2.3.gem +0 -0
  36. data/vendor/bundle/ruby/3.4.0/cache/logger-1.7.0.gem +0 -0
  37. data/vendor/bundle/ruby/3.4.0/cache/minitest-6.0.6.gem +0 -0
  38. data/vendor/bundle/ruby/3.4.0/cache/prism-1.9.0.gem +0 -0
  39. data/vendor/bundle/ruby/3.4.0/cache/rake-13.4.2.gem +0 -0
  40. data/vendor/bundle/ruby/3.4.0/cache/rake-compiler-1.3.2.gem +0 -0
  41. data/vendor/bundle/ruby/3.4.0/cache/rake-compiler-dock-1.12.0.gem +0 -0
  42. data/vendor/bundle/ruby/3.4.0/cache/rb_sys-0.9.130.gem +0 -0
  43. data/vendor/bundle/ruby/3.4.0/cache/rbs-4.2.0.gem +0 -0
  44. data/vendor/bundle/ruby/3.4.0/cache/toml-rb-6.0.0.gem +0 -0
  45. data/vendor/bundle/ruby/3.4.0/cache/tsort-0.2.0.gem +0 -0
  46. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/gem.build_complete +0 -0
  47. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/gem_make.out +44 -0
  48. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/mkmf.log +74 -0
  49. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/prism/prism.so +0 -0
  50. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/gem.build_complete +0 -0
  51. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/gem_make.out +41 -0
  52. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/mkmf.log +102 -0
  53. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/rbs_extension.so +0 -0
  54. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/LICENSE.txt +22 -0
  55. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/drb.gemspec +42 -0
  56. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/acl.rb +239 -0
  57. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/drb.rb +1993 -0
  58. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/eq.rb +15 -0
  59. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/extserv.rb +44 -0
  60. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/extservm.rb +94 -0
  61. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/gw.rb +161 -0
  62. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/observer.rb +26 -0
  63. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/ssl.rb +354 -0
  64. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/timeridconv.rb +97 -0
  65. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/unix.rb +118 -0
  66. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/version.rb +3 -0
  67. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb/weakidconv.rb +31 -0
  68. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.3/lib/drb.rb +3 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/BSDL +22 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/COPYING +56 -0
  71. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/README.md +104 -0
  72. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/errors.rb +9 -0
  73. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/formatter.rb +36 -0
  74. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/log_device.rb +265 -0
  75. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/period.rb +47 -0
  76. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/severity.rb +38 -0
  77. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger/version.rb +5 -0
  78. data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/lib/logger.rb +789 -0
  79. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/History.rdoc +1860 -0
  80. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/Manifest.txt +41 -0
  81. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/README.rdoc +763 -0
  82. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/Rakefile +89 -0
  83. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/bin/minitest +5 -0
  84. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/design_rationale.rb +54 -0
  85. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/hoe/minitest.rb +30 -0
  86. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/assertions.rb +821 -0
  87. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/autorun.rb +5 -0
  88. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/benchmark.rb +452 -0
  89. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/bisect.rb +304 -0
  90. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/complete.rb +56 -0
  91. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/compress.rb +94 -0
  92. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/error_on_warning.rb +11 -0
  93. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/expectations.rb +321 -0
  94. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/find_minimal_combination.rb +127 -0
  95. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/hell.rb +11 -0
  96. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/manual_plugins.rb +4 -0
  97. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/parallel.rb +72 -0
  98. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/path_expander.rb +432 -0
  99. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/pride.rb +4 -0
  100. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/pride_plugin.rb +135 -0
  101. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/server.rb +49 -0
  102. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/server_plugin.rb +88 -0
  103. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/spec.rb +324 -0
  104. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/sprint.rb +105 -0
  105. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/sprint_plugin.rb +39 -0
  106. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/test.rb +232 -0
  107. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest/test_task.rb +331 -0
  108. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/lib/minitest.rb +1232 -0
  109. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/metametameta.rb +150 -0
  110. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_bisect.rb +249 -0
  111. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_find_minimal_combination.rb +138 -0
  112. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_assertions.rb +1729 -0
  113. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_benchmark.rb +151 -0
  114. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_reporter.rb +437 -0
  115. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_spec.rb +1095 -0
  116. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_test.rb +1295 -0
  117. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_minitest_test_task.rb +57 -0
  118. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_path_expander.rb +229 -0
  119. data/vendor/bundle/ruby/3.4.0/gems/minitest-6.0.6/test/minitest/test_server.rb +146 -0
  120. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/BSDmakefile +58 -0
  121. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CHANGELOG.md +786 -0
  122. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CODE_OF_CONDUCT.md +76 -0
  123. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/CONTRIBUTING.md +58 -0
  124. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/LICENSE.md +7 -0
  125. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/Makefile +116 -0
  126. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/README.md +143 -0
  127. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/config.yml +4739 -0
  128. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/build_system.md +119 -0
  129. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/configuration.md +68 -0
  130. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/cruby_compilation.md +27 -0
  131. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/design.md +53 -0
  132. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/encoding.md +121 -0
  133. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/fuzzing.md +88 -0
  134. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/heredocs.md +36 -0
  135. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/javascript.md +118 -0
  136. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/local_variable_depth.md +229 -0
  137. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/mapping.md +117 -0
  138. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/parser_translation.md +24 -0
  139. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/parsing_rules.md +22 -0
  140. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/releasing.md +75 -0
  141. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/relocation.md +34 -0
  142. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ripper_translation.md +63 -0
  143. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ruby_api.md +45 -0
  144. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/ruby_parser_translation.md +19 -0
  145. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/serialization.md +233 -0
  146. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/docs/testing.md +55 -0
  147. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/Makefile +273 -0
  148. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/api_node.c +6945 -0
  149. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/api_pack.c +276 -0
  150. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extconf.rb +127 -0
  151. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extension.c +1427 -0
  152. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/extension.h +19 -0
  153. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/ast.h +8254 -0
  154. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/defines.h +260 -0
  155. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/diagnostic.h +458 -0
  156. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/encoding.h +283 -0
  157. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/node.h +129 -0
  158. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/options.h +488 -0
  159. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/pack.h +163 -0
  160. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/parser.h +936 -0
  161. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/prettyprint.h +34 -0
  162. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/regexp.h +43 -0
  163. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/static_literals.h +121 -0
  164. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_buffer.h +236 -0
  165. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_char.h +204 -0
  166. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_constant_pool.h +218 -0
  167. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_integer.h +130 -0
  168. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_list.h +103 -0
  169. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_memchr.h +29 -0
  170. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_newline_list.h +113 -0
  171. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_string.h +200 -0
  172. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_strncasecmp.h +32 -0
  173. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/util/pm_strpbrk.h +46 -0
  174. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism/version.h +29 -0
  175. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/include/prism.h +408 -0
  176. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/compiler.rb +801 -0
  177. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/desugar_compiler.rb +392 -0
  178. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dispatcher.rb +2210 -0
  179. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dot_visitor.rb +4767 -0
  180. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/dsl.rb +1003 -0
  181. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/ffi.rb +578 -0
  182. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/inspect_visitor.rb +2393 -0
  183. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/lex_compat.rb +911 -0
  184. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/mutation_compiler.rb +772 -0
  185. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/node.rb +19966 -0
  186. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/node_ext.rb +511 -0
  187. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/pack.rb +230 -0
  188. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/comments.rb +188 -0
  189. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/errors.rb +66 -0
  190. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result/newlines.rb +155 -0
  191. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/parse_result.rb +907 -0
  192. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/pattern.rb +269 -0
  193. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/append_as_bytes.rb +15 -0
  194. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/byteindex.rb +13 -0
  195. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/scan_byte.rb +14 -0
  196. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/unpack1.rb +14 -0
  197. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/polyfill/warn.rb +36 -0
  198. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
  199. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/reflection.rb +416 -0
  200. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/relocation.rb +505 -0
  201. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/serialize.rb +2400 -0
  202. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/string_query.rb +31 -0
  203. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/builder.rb +62 -0
  204. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/compiler.rb +2234 -0
  205. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser/lexer.rb +820 -0
  206. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser.rb +376 -0
  207. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser_current.rb +26 -0
  208. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/parser_versions.rb +36 -0
  209. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/filter.rb +53 -0
  210. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/lexer.rb +135 -0
  211. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/sexp.rb +126 -0
  212. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper/shim.rb +5 -0
  213. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ripper.rb +3520 -0
  214. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation/ruby_parser.rb +1964 -0
  215. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/translation.rb +18 -0
  216. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/visitor.rb +813 -0
  217. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism.rb +98 -0
  218. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/prism.gemspec +172 -0
  219. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/compiler.rbi +12 -0
  220. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/dsl.rbi +524 -0
  221. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/inspect_visitor.rbi +12 -0
  222. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/node.rbi +8750 -0
  223. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/node_ext.rbi +107 -0
  224. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/parse_result.rbi +404 -0
  225. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/reflection.rbi +58 -0
  226. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/string_query.rbi +12 -0
  227. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/parser.rbi +11 -0
  228. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/parser_versions.rbi +23 -0
  229. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/translation/ripper.rbi +15 -0
  230. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism/visitor.rbi +473 -0
  231. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/rbi/prism.rbi +63 -0
  232. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/compiler.rbs +9 -0
  233. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dispatcher.rbs +19 -0
  234. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dot_visitor.rbs +6 -0
  235. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/dsl.rbs +351 -0
  236. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/inspect_visitor.rbs +22 -0
  237. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/lex_compat.rbs +10 -0
  238. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/mutation_compiler.rbs +159 -0
  239. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/node.rbs +4042 -0
  240. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/node_ext.rbs +149 -0
  241. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/pack.rbs +43 -0
  242. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/parse_result/comments.rbs +38 -0
  243. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/parse_result.rbs +197 -0
  244. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/pattern.rbs +13 -0
  245. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/reflection.rbs +50 -0
  246. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/relocation.rbs +185 -0
  247. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/serialize.rbs +8 -0
  248. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/string_query.rbs +11 -0
  249. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism/visitor.rbs +169 -0
  250. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/sig/prism.rbs +272 -0
  251. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/diagnostic.c +854 -0
  252. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/encoding.c +5340 -0
  253. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/node.c +8685 -0
  254. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/options.c +338 -0
  255. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/pack.c +509 -0
  256. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/prettyprint.c +8957 -0
  257. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/prism.c +22679 -0
  258. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/regexp.c +790 -0
  259. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/serialize.c +2274 -0
  260. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/static_literals.c +617 -0
  261. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/token_type.c +703 -0
  262. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_buffer.c +357 -0
  263. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_char.c +318 -0
  264. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_constant_pool.c +342 -0
  265. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_integer.c +670 -0
  266. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_list.c +49 -0
  267. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_memchr.c +35 -0
  268. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_newline_list.c +125 -0
  269. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_string.c +381 -0
  270. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_strncasecmp.c +36 -0
  271. data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/src/util/pm_strpbrk.c +206 -0
  272. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/History.rdoc +2454 -0
  273. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/MIT-LICENSE +21 -0
  274. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/README.rdoc +155 -0
  275. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/command_line_usage.rdoc +171 -0
  276. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/Rakefile1 +38 -0
  277. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/Rakefile2 +35 -0
  278. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/a.c +6 -0
  279. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/b.c +6 -0
  280. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/example/main.c +11 -0
  281. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/glossary.rdoc +42 -0
  282. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/jamis.rb +592 -0
  283. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/proto_rake.rdoc +127 -0
  284. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rake.1 +156 -0
  285. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rakefile.rdoc +635 -0
  286. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/doc/rational.rdoc +151 -0
  287. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/exe/rake +27 -0
  288. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/application.rb +847 -0
  289. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/backtrace.rb +25 -0
  290. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/clean.rb +78 -0
  291. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/cloneable.rb +17 -0
  292. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/cpu_counter.rb +122 -0
  293. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/default_loader.rb +15 -0
  294. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/dsl_definition.rb +196 -0
  295. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/early_time.rb +22 -0
  296. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/ext/core.rb +26 -0
  297. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/ext/string.rb +176 -0
  298. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_creation_task.rb +25 -0
  299. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_list.rb +435 -0
  300. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_task.rb +58 -0
  301. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_utils.rb +137 -0
  302. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/file_utils_ext.rb +135 -0
  303. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/invocation_chain.rb +57 -0
  304. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/invocation_exception_mixin.rb +17 -0
  305. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/late_time.rb +18 -0
  306. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/linked_list.rb +112 -0
  307. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/loaders/makefile.rb +54 -0
  308. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/multi_task.rb +14 -0
  309. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/name_space.rb +38 -0
  310. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/options.rb +31 -0
  311. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/packagetask.rb +222 -0
  312. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/phony.rb +16 -0
  313. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/private_reader.rb +21 -0
  314. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/promise.rb +100 -0
  315. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/pseudo_status.rb +30 -0
  316. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rake_module.rb +67 -0
  317. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rake_test_loader.rb +27 -0
  318. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  319. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/scope.rb +43 -0
  320. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task.rb +434 -0
  321. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_argument_error.rb +8 -0
  322. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_arguments.rb +113 -0
  323. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/task_manager.rb +333 -0
  324. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/tasklib.rb +12 -0
  325. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/testtask.rb +192 -0
  326. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/thread_history_display.rb +49 -0
  327. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/thread_pool.rb +157 -0
  328. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/trace_output.rb +23 -0
  329. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/version.rb +10 -0
  330. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake/win32.rb +17 -0
  331. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/lib/rake.rb +69 -0
  332. data/vendor/bundle/ruby/3.4.0/gems/rake-13.4.2/rake.gemspec +102 -0
  333. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/Gemfile +8 -0
  334. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/History.md +708 -0
  335. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/LICENSE.txt +20 -0
  336. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/README.md +505 -0
  337. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/Rakefile +15 -0
  338. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/appveyor.yml +22 -0
  339. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/bin/rake-compiler +24 -0
  340. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/cucumber.yml +4 -0
  341. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/compile.feature +79 -0
  342. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-compile.feature +23 -0
  343. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-package-multi.feature +15 -0
  344. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/cross-package.feature +14 -0
  345. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-compile.feature +22 -0
  346. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-no-native-compile.feature +33 -0
  347. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/java-package.feature +24 -0
  348. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/package.feature +40 -0
  349. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/compilation.rb +70 -0
  350. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/cross_compilation.rb +27 -0
  351. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/execution.rb +52 -0
  352. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/folders.rb +32 -0
  353. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/gem.rb +46 -0
  354. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/step_definitions/java_compilation.rb +7 -0
  355. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/env.rb +10 -0
  356. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/file_template_helpers.rb +137 -0
  357. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/generator_helpers.rb +123 -0
  358. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/features/support/platform_extension_helpers.rb +27 -0
  359. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/baseextensiontask.rb +90 -0
  360. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/compiler_config.rb +38 -0
  361. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/extensioncompiler.rb +51 -0
  362. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/extensiontask.rb +621 -0
  363. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/lib/rake/javaextensiontask.rb +321 -0
  364. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/bin/cross-ruby.rake +189 -0
  365. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/bootstrap.rake +11 -0
  366. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/common.rake +10 -0
  367. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/cucumber.rake +23 -0
  368. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/gem.rake +15 -0
  369. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-1.3.2/tasks/rspec.rake +9 -0
  370. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/CHANGELOG.md +446 -0
  371. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/CONTRIBUTING.md +109 -0
  372. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Dockerfile.jruby +79 -0
  373. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Dockerfile.mri.erb +282 -0
  374. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Gemfile +8 -0
  375. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/LICENSE.txt +22 -0
  376. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/README.md +447 -0
  377. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/Rakefile +246 -0
  378. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/bin/rake-compiler-dock +18 -0
  379. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/buildkitd.toml +2 -0
  380. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/gem_helper.rb +54 -0
  381. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_i686.rb +18 -0
  382. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_musl_cross.sh +37 -0
  383. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_osxcross.sh +45 -0
  384. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/mk_pkg_config.sh +24 -0
  385. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/parallel_docker_build.rb +169 -0
  386. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0004-Enable-build-of-static-libruby.patch +38 -0
  387. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0005-build-miniruby-first.patch +16 -0
  388. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/patches/rake-compiler-1.3.1/0006-ruby-4-rubyspec-capiext.patch +16 -0
  389. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/rcd-env.sh +6 -0
  390. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/runas +7 -0
  391. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/sigfw.c +45 -0
  392. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/strip_wrapper_codesign +17 -0
  393. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/strip_wrapper_vbox +30 -0
  394. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/build/sudoers +1 -0
  395. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/colors.rb +43 -0
  396. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/docker_check.rb +356 -0
  397. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/predefined_user_group.rb +5 -0
  398. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/starter.rb +206 -0
  399. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock/version.rb +4 -0
  400. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/lib/rake_compiler_dock.rb +151 -0
  401. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/Dockerfile +66 -0
  402. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/README.md +14 -0
  403. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/binutils-mingw-w64-ignore-check-errors.patch +13 -0
  404. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/gcc-mingw-w64-only-c-c++.patch +13 -0
  405. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/mingw64-ucrt/mingw-w64-enable-ucrt.patch +22 -0
  406. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/rake-compiler-dock.gemspec +34 -0
  407. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/env/Dockerfile.alpine +17 -0
  408. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/env/Dockerfile.debian +24 -0
  409. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/fixtures/mig_test_rpc.defs +8 -0
  410. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/Gemfile +11 -0
  411. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/Rakefile +97 -0
  412. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/java/RcdTestExtService.java +19 -0
  413. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/java/RubyRcdTest.java +16 -0
  414. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/extconf.rb +111 -0
  415. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/rcd_test_ext.c +65 -0
  416. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/ext/mri/rcd_test_ext.h +11 -0
  417. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/lib/rcd_test.rb +6 -0
  418. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/rcd_test.gemspec +28 -0
  419. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/rcd_test/test/test_basic.rb +49 -0
  420. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_environment_variables.rb +108 -0
  421. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_mig.rb +18 -0
  422. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_parallel_docker_build.rb +95 -0
  423. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_rubygems_plugins.rb +12 -0
  424. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_starter.rb +158 -0
  425. data/vendor/bundle/ruby/3.4.0/gems/rake-compiler-dock-1.12.0/test/test_versions.rb +82 -0
  426. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/LICENSE-APACHE +190 -0
  427. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/LICENSE-MIT +21 -0
  428. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/README.md +42 -0
  429. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/certs/ianks.pem +21 -0
  430. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/exe/rb-sys-dock +495 -0
  431. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo/config.rb +72 -0
  432. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo/metadata.rb +158 -0
  433. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo.rb +9 -0
  434. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo_builder/link_flag_converter.rb +37 -0
  435. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/cargo_builder.rb +370 -0
  436. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/error.rb +43 -0
  437. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/extensiontask.rb +188 -0
  438. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/mkmf/config.rb +75 -0
  439. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/mkmf.rb +413 -0
  440. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/toolchain_info/data.rb +10 -0
  441. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/toolchain_info.rb +82 -0
  442. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/util/logger.rb +73 -0
  443. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys/version.rb +5 -0
  444. data/vendor/bundle/ruby/3.4.0/gems/rb_sys-0.9.130/lib/rb_sys.rb +8 -0
  445. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/BSDL +22 -0
  446. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/CHANGELOG.md +2463 -0
  447. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/COPYING +56 -0
  448. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Dockerfile.jruby +53 -0
  449. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/README.md +240 -0
  450. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Rakefile +1213 -0
  451. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/Steepfile +55 -0
  452. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/config.yml +920 -0
  453. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/array.rbs +4205 -0
  454. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/basic_object.rbs +376 -0
  455. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/binding.rbs +148 -0
  456. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/builtin.rbs +278 -0
  457. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/class.rbs +223 -0
  458. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/comparable.rbs +192 -0
  459. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/complex.rbs +812 -0
  460. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/constants.rbs +96 -0
  461. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/data.rbs +415 -0
  462. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/dir.rbs +993 -0
  463. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/encoding.rbs +1368 -0
  464. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerable.rbs +2506 -0
  465. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator/arithmetic_sequence.rbs +70 -0
  466. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator/product.rbs +92 -0
  467. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/enumerator.rbs +705 -0
  468. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/env.rbs +6 -0
  469. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/errno.rbs +682 -0
  470. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/errors.rbs +789 -0
  471. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/exception.rbs +485 -0
  472. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/false_class.rbs +82 -0
  473. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/fiber.rbs +570 -0
  474. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/fiber_error.rbs +11 -0
  475. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file.rbs +2045 -0
  476. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_constants.rbs +463 -0
  477. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_stat.rbs +534 -0
  478. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/file_test.rbs +331 -0
  479. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/float.rbs +1292 -0
  480. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/gc.rbs +788 -0
  481. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/global_variables.rbs +184 -0
  482. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/hash.rbs +2183 -0
  483. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/integer.rbs +1374 -0
  484. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io/buffer.rbs +995 -0
  485. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io/wait.rbs +48 -0
  486. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/io.rbs +3473 -0
  487. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/kernel.rbs +3172 -0
  488. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/marshal.rbs +207 -0
  489. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/match_data.rbs +637 -0
  490. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/math.rbs +770 -0
  491. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/method.rbs +422 -0
  492. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/module.rbs +1856 -0
  493. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/nil_class.rbs +210 -0
  494. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/numeric.rbs +832 -0
  495. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object.rbs +108 -0
  496. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object_space/weak_key_map.rbs +166 -0
  497. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/object_space.rbs +197 -0
  498. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/pathname.rbs +1312 -0
  499. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/proc.rbs +905 -0
  500. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/process.rbs +2316 -0
  501. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ractor.rbs +914 -0
  502. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/random.rbs +255 -0
  503. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/range.rbs +1209 -0
  504. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rational.rbs +502 -0
  505. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rb_config.rbs +88 -0
  506. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/ops.rbs +154 -0
  507. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/argf.rbs +1236 -0
  508. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/env_class.rbs +1214 -0
  509. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/main_class.rbs +123 -0
  510. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rbs/unnamed/random.rbs +186 -0
  511. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/refinement.rbs +59 -0
  512. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/regexp.rbs +1974 -0
  513. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ruby.rbs +53 -0
  514. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/ruby_vm.rbs +809 -0
  515. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/basic_specification.rbs +6 -0
  516. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/config_file.rbs +38 -0
  517. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/dependency_installer.rbs +6 -0
  518. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/errors.rbs +112 -0
  519. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/installer.rbs +15 -0
  520. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/path_support.rbs +6 -0
  521. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/platform.rbs +7 -0
  522. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/request_set.rbs +49 -0
  523. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/requirement.rbs +138 -0
  524. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/rubygems.rbs +1108 -0
  525. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/source_list.rbs +15 -0
  526. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/specification.rbs +31 -0
  527. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/stream_ui.rbs +5 -0
  528. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/uninstaller.rbs +10 -0
  529. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/rubygems/version.rbs +133 -0
  530. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/set.rbs +751 -0
  531. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/signal.rbs +110 -0
  532. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/string.rbs +5532 -0
  533. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/struct.rbs +668 -0
  534. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/symbol.rbs +482 -0
  535. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/thread.rbs +1821 -0
  536. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/thread_group.rbs +79 -0
  537. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/time.rbs +1793 -0
  538. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/trace_point.rbs +483 -0
  539. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/true_class.rbs +98 -0
  540. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/unbound_method.rbs +337 -0
  541. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/core/warning.rbs +87 -0
  542. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/CONTRIBUTING.md +107 -0
  543. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/aliases.md +79 -0
  544. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/architecture.md +110 -0
  545. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/collection.md +192 -0
  546. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/config.md +171 -0
  547. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/data_and_struct.md +86 -0
  548. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/encoding.md +56 -0
  549. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/gem.md +56 -0
  550. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/inline.md +634 -0
  551. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/rbs_by_example.md +309 -0
  552. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/release.md +303 -0
  553. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/repo.md +125 -0
  554. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/rust.md +96 -0
  555. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/sigs.md +167 -0
  556. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/stdlib.md +155 -0
  557. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/syntax.md +952 -0
  558. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/tools.md +17 -0
  559. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/type_fingerprint.md +21 -0
  560. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/docs/wasm_serialization.md +80 -0
  561. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/exe/rbs +7 -0
  562. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/Makefile +273 -0
  563. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/ast_translation.c +1870 -0
  564. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/ast_translation.h +41 -0
  565. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/class_constants.c +189 -0
  566. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/class_constants.h +105 -0
  567. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/compat.h +10 -0
  568. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/extconf.rb +40 -0
  569. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/legacy_location.c +299 -0
  570. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/legacy_location.h +82 -0
  571. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/main.c +649 -0
  572. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_extension.h +16 -0
  573. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_string_bridging.c +9 -0
  574. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/rbs_string_bridging.h +24 -0
  575. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/goodcheck.yml +91 -0
  576. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/ast.h +1055 -0
  577. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/defines.h +104 -0
  578. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/lexer.h +208 -0
  579. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/location.h +40 -0
  580. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/parser.h +187 -0
  581. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/serialize.h +39 -0
  582. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/string.h +47 -0
  583. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_allocator.h +59 -0
  584. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_assert.h +20 -0
  585. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_buffer.h +83 -0
  586. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_constant_pool.h +155 -0
  587. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_encoding.h +282 -0
  588. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs/util/rbs_unescape.h +24 -0
  589. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/include/rbs.h +14 -0
  590. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ancestor_graph.rb +92 -0
  591. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/annotations.rb +199 -0
  592. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/formatter.rb +82 -0
  593. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  594. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate/rdoc_source.rb +131 -0
  595. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/annotate.rb +8 -0
  596. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/annotation.rb +29 -0
  597. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/comment.rb +29 -0
  598. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/declarations.rb +472 -0
  599. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/directives.rb +49 -0
  600. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/members.rb +451 -0
  601. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/annotations.rb +451 -0
  602. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/comment_block.rb +247 -0
  603. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/declarations.rb +291 -0
  604. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/helpers/constant_helper.rb +28 -0
  605. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/helpers/location_helper.rb +15 -0
  606. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/ruby/members.rb +762 -0
  607. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/type_param.rb +235 -0
  608. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/ast/visitor.rb +137 -0
  609. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/buffer.rb +189 -0
  610. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/builtin_names.rb +58 -0
  611. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/colored_io.rb +48 -0
  612. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/diff.rb +84 -0
  613. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli/validate.rb +294 -0
  614. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/cli.rb +1253 -0
  615. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/cleaner.rb +38 -0
  616. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config/lockfile.rb +92 -0
  617. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config/lockfile_generator.rb +269 -0
  618. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/config.rb +81 -0
  619. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/installer.rb +32 -0
  620. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/base.rb +14 -0
  621. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/git.rb +265 -0
  622. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/local.rb +81 -0
  623. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/rubygems.rb +48 -0
  624. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources/stdlib.rb +50 -0
  625. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection/sources.rb +38 -0
  626. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/collection.rb +16 -0
  627. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/constant.rb +28 -0
  628. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition.rb +415 -0
  629. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder/ancestor_builder.rb +681 -0
  630. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder/method_builder.rb +295 -0
  631. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/definition_builder.rb +1057 -0
  632. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/diff.rb +131 -0
  633. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/class_entry.rb +81 -0
  634. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/module_entry.rb +91 -0
  635. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment/use_map.rb +77 -0
  636. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment.rb +1028 -0
  637. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment_loader.rb +167 -0
  638. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/environment_walker.rb +155 -0
  639. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/errors.rb +634 -0
  640. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/factory.rb +18 -0
  641. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/file_finder.rb +28 -0
  642. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/inline_parser/comment_association.rb +117 -0
  643. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/inline_parser.rb +568 -0
  644. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/location_aux.rb +170 -0
  645. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/locator.rb +247 -0
  646. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/method_type.rb +145 -0
  647. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/namespace.rb +154 -0
  648. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser/lex_result.rb +15 -0
  649. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser/token.rb +23 -0
  650. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/parser_aux.rb +144 -0
  651. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/helpers.rb +164 -0
  652. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/node_usage.rb +99 -0
  653. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/rb.rb +816 -0
  654. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/rbi.rb +793 -0
  655. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/helpers.rb +59 -0
  656. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/reflection.rb +19 -0
  657. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime/value_object_generator.rb +278 -0
  658. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/prototype/runtime.rb +680 -0
  659. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/repository.rb +127 -0
  660. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/resolver/constant_resolver.rb +219 -0
  661. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/resolver/type_name_resolver.rb +167 -0
  662. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/rewriter.rb +70 -0
  663. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/sorter.rb +198 -0
  664. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/source.rb +99 -0
  665. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/substitution.rb +83 -0
  666. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/subtractor.rb +204 -0
  667. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/errors.rb +80 -0
  668. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/guaranteed.rb +30 -0
  669. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/hook.rb +212 -0
  670. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/observer.rb +19 -0
  671. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/setup.rb +84 -0
  672. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/setup_helper.rb +50 -0
  673. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/tester.rb +167 -0
  674. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test/type_check.rb +457 -0
  675. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/test.rb +112 -0
  676. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_alias_dependency.rb +100 -0
  677. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_alias_regularity.rb +126 -0
  678. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/type_name.rb +122 -0
  679. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/types.rb +1646 -0
  680. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/convertibles.rb +177 -0
  681. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/spy.rb +138 -0
  682. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/type_assertions.rb +383 -0
  683. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test/with_aliases.rb +145 -0
  684. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/unit_test.rb +6 -0
  685. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/validator.rb +186 -0
  686. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/variance_calculator.rb +189 -0
  687. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/vendorer.rb +71 -0
  688. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/version.rb +5 -0
  689. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/deserializer.rb +213 -0
  690. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/location.rb +61 -0
  691. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/parser.rb +174 -0
  692. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/runtime.rb +211 -0
  693. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/wasm/serialization_schema.rb +111 -0
  694. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs/writer.rb +424 -0
  695. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs.rb +117 -0
  696. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs_extension.so +0 -0
  697. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs_jars.rb +39 -0
  698. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rdoc/discover.rb +20 -0
  699. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rdoc_plugin/parser.rb +168 -0
  700. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/rbs.gemspec +77 -0
  701. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/annotation.json +14 -0
  702. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/comment.json +26 -0
  703. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/decls.json +326 -0
  704. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/function.json +98 -0
  705. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/location.json +56 -0
  706. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/members.json +266 -0
  707. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/methodType.json +50 -0
  708. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/typeParam.json +52 -0
  709. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/schema/types.json +317 -0
  710. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ancestor_builder.rbs +163 -0
  711. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ancestor_graph.rbs +60 -0
  712. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/annotations.rbs +102 -0
  713. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/formatter.rbs +24 -0
  714. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/rdoc_annotater.rbs +85 -0
  715. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotate/rdoc_source.rbs +32 -0
  716. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/annotation.rbs +27 -0
  717. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/annotations.rbs +470 -0
  718. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/comment_block.rbs +127 -0
  719. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/declarations.rbs +158 -0
  720. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/helpers/constant_helper.rbs +11 -0
  721. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/helpers/location_helper.rbs +15 -0
  722. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/ast/ruby/members.rbs +198 -0
  723. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/buffer.rbs +108 -0
  724. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/builtin_names.rbs +44 -0
  725. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/colored_io.rbs +15 -0
  726. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/diff.rbs +15 -0
  727. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli/validate.rbs +47 -0
  728. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/cli.rbs +89 -0
  729. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/cleaner.rbs +13 -0
  730. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config/lockfile.rbs +74 -0
  731. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config/lockfile_generator.rbs +68 -0
  732. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/config.rbs +46 -0
  733. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/installer.rbs +17 -0
  734. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection/sources.rbs +214 -0
  735. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/collection.rbs +4 -0
  736. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/comment.rbs +26 -0
  737. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/constant.rbs +21 -0
  738. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/declarations.rbs +274 -0
  739. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/definition.rbs +232 -0
  740. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/definition_builder.rbs +181 -0
  741. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/diff.rbs +28 -0
  742. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/directives.rbs +77 -0
  743. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment/class_entry.rbs +56 -0
  744. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment/module_entry.rbs +65 -0
  745. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment.rbs +286 -0
  746. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment_loader.rbs +111 -0
  747. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/environment_walker.rbs +65 -0
  748. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/errors.rbs +408 -0
  749. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/factory.rbs +5 -0
  750. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/file_finder.rbs +28 -0
  751. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/inline_parser/comment_association.rbs +71 -0
  752. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/inline_parser.rbs +126 -0
  753. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/location.rbs +135 -0
  754. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/locator.rbs +56 -0
  755. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/manifest.yaml +5 -0
  756. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/members.rbs +258 -0
  757. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/method_builder.rbs +89 -0
  758. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/method_types.rbs +58 -0
  759. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/namespace.rbs +161 -0
  760. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/parser.rbs +164 -0
  761. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/helpers.rbs +29 -0
  762. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/node_usage.rbs +20 -0
  763. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/rb.rbs +96 -0
  764. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/rbi.rbs +104 -0
  765. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/prototype/runtime.rbs +182 -0
  766. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rbs.rbs +21 -0
  767. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rdoc/rbs.rbs +67 -0
  768. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/repository.rbs +85 -0
  769. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/constant_resolver.rbs +92 -0
  770. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/context.rbs +34 -0
  771. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/resolver/type_name_resolver.rbs +61 -0
  772. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/rewriter.rbs +45 -0
  773. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/bundler.rbs +38 -0
  774. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/enumerable.rbs +5 -0
  775. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/shims/rubygems.rbs +19 -0
  776. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/sorter.rbs +41 -0
  777. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/source.rbs +48 -0
  778. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/substitution.rbs +48 -0
  779. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/subtractor.rbs +37 -0
  780. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/errors.rbs +52 -0
  781. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/guranteed.rbs +9 -0
  782. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test/type_check.rbs +19 -0
  783. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/test.rbs +82 -0
  784. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_alias_dependency.rbs +53 -0
  785. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_alias_regularity.rbs +98 -0
  786. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/type_param.rbs +115 -0
  787. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/typename.rbs +89 -0
  788. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/types.rbs +588 -0
  789. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/convertibles.rbs +154 -0
  790. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/spy.rbs +22 -0
  791. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/type_assertions.rbs +211 -0
  792. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/unit_test/with_aliases.rbs +136 -0
  793. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/use_map.rbs +35 -0
  794. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/util.rbs +9 -0
  795. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/validator.rbs +63 -0
  796. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/variance_calculator.rbs +87 -0
  797. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/vendorer.rbs +51 -0
  798. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/version.rbs +3 -0
  799. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/visitor.rbs +47 -0
  800. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/wasm/deserializer.rbs +66 -0
  801. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/wasm/serialization_schema.rbs +13 -0
  802. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/sig/writer.rbs +127 -0
  803. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/ast.c +1644 -0
  804. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexer.c +3223 -0
  805. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexer.re +187 -0
  806. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/lexstate.c +222 -0
  807. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/location.c +31 -0
  808. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/parser.c +4318 -0
  809. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/serialize.c +965 -0
  810. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/string.c +41 -0
  811. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_allocator.c +171 -0
  812. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_assert.c +19 -0
  813. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_buffer.c +54 -0
  814. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_constant_pool.c +268 -0
  815. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_encoding.c +21454 -0
  816. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/src/util/rbs_unescape.c +167 -0
  817. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/abbrev/0/abbrev.rbs +66 -0
  818. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/abbrev/0/array.rbs +26 -0
  819. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/base64/0/base64.rbs +355 -0
  820. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/benchmark/0/benchmark.rbs +452 -0
  821. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal/0/big_decimal.rbs +1647 -0
  822. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal-math/0/big_math.rbs +280 -0
  823. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/bigdecimal-math/0/manifest.yaml +2 -0
  824. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi/0/core.rbs +911 -0
  825. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi/0/manifest.yaml +4 -0
  826. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/cgi-escape/0/escape.rbs +171 -0
  827. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/coverage/0/coverage.rbs +266 -0
  828. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/csv/0/csv.rbs +3776 -0
  829. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/csv/0/manifest.yaml +3 -0
  830. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/date.rbs +1598 -0
  831. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/date_time.rbs +617 -0
  832. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/date/0/time.rbs +26 -0
  833. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/dbm/0/dbm.rbs +421 -0
  834. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/delegator.rbs +188 -0
  835. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/kernel.rbs +47 -0
  836. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/delegate/0/simple_delegator.rbs +96 -0
  837. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/did_you_mean/0/did_you_mean.rbs +344 -0
  838. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/digest/0/digest.rbs +693 -0
  839. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/erb/0/erb.rbs +933 -0
  840. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/etc/0/etc.rbs +884 -0
  841. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/fileutils/0/fileutils.rbs +1753 -0
  842. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/find/0/find.rbs +49 -0
  843. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/forwardable/0/forwardable.rbs +271 -0
  844. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/io-console/0/io-console.rbs +414 -0
  845. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/ipaddr/0/ipaddr.rbs +431 -0
  846. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/json/0/json.rbs +1963 -0
  847. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/kconv/0/kconv.rbs +166 -0
  848. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/formatter.rbs +45 -0
  849. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/log_device.rbs +100 -0
  850. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/logger.rbs +796 -0
  851. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/manifest.yaml +2 -0
  852. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/period.rbs +17 -0
  853. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/logger/0/severity.rbs +34 -0
  854. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/kernel.rbs +42 -0
  855. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/abstract_reporter.rbs +52 -0
  856. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/assertion.rbs +17 -0
  857. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/assertions.rbs +590 -0
  858. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/backtrace_filter.rbs +23 -0
  859. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/bench_spec.rbs +102 -0
  860. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/benchmark.rbs +259 -0
  861. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/composite_reporter.rbs +25 -0
  862. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/compress.rbs +13 -0
  863. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/error_on_warning.rbs +3 -0
  864. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/expectation.rbs +2 -0
  865. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/expectations.rbs +21 -0
  866. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/guard.rbs +64 -0
  867. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/mock.rbs +64 -0
  868. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/executor.rbs +46 -0
  869. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +5 -0
  870. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel/test.rbs +3 -0
  871. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/parallel.rbs +2 -0
  872. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/pride_io.rbs +62 -0
  873. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/pride_lol.rbs +19 -0
  874. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/progress_reporter.rbs +11 -0
  875. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/reportable.rbs +53 -0
  876. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/reporter.rbs +5 -0
  877. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/result.rbs +28 -0
  878. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/runnable.rbs +163 -0
  879. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/skip.rbs +6 -0
  880. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +48 -0
  881. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec/dsl.rbs +129 -0
  882. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/spec.rbs +11 -0
  883. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/statistics_reporter.rbs +81 -0
  884. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/summary_reporter.rbs +18 -0
  885. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +92 -0
  886. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/test.rbs +69 -0
  887. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unexpected_error.rbs +12 -0
  888. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unexpected_warning.rbs +6 -0
  889. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unit/test_case.rbs +3 -0
  890. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest/unit.rbs +4 -0
  891. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/minitest/0/minitest.rbs +115 -0
  892. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/monitor/0/monitor.rbs +363 -0
  893. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/mutex_m/0/mutex_m.rbs +104 -0
  894. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-http/0/manifest.yaml +3 -0
  895. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-http/0/net-http.rbs +5580 -0
  896. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-protocol/0/manifest.yaml +2 -0
  897. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-protocol/0/net-protocol.rbs +56 -0
  898. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-smtp/0/manifest.yaml +2 -0
  899. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/net-smtp/0/net-smtp.rbs +55 -0
  900. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/nkf/0/nkf.rbs +402 -0
  901. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/objspace/0/objspace.rbs +470 -0
  902. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/observable/0/observable.rbs +217 -0
  903. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open-uri/0/manifest.yaml +4 -0
  904. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open-uri/0/open-uri.rbs +433 -0
  905. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/open3/0/open3.rbs +606 -0
  906. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/openssl/0/manifest.yaml +3 -0
  907. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/openssl/0/openssl.rbs +12237 -0
  908. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/optparse/0/optparse.rbs +1734 -0
  909. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pathname/0/pathname.rbs +36 -0
  910. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pp/0/manifest.yaml +2 -0
  911. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pp/0/pp.rbs +301 -0
  912. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/prettyprint/0/prettyprint.rbs +383 -0
  913. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pstore/0/pstore.rbs +608 -0
  914. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/core_ext.rbs +12 -0
  915. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/dbm.rbs +237 -0
  916. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/manifest.yaml +3 -0
  917. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/psych.rbs +455 -0
  918. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/psych/0/store.rbs +57 -0
  919. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/pty/0/pty.rbs +240 -0
  920. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/random-formatter/0/random-formatter.rbs +277 -0
  921. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/code_object.rbs +52 -0
  922. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/comment.rbs +61 -0
  923. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/context.rbs +153 -0
  924. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/markup.rbs +117 -0
  925. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/options.rbs +76 -0
  926. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/parser.rbs +56 -0
  927. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/rdoc.rbs +393 -0
  928. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/ri.rbs +17 -0
  929. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/store.rbs +48 -0
  930. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/rdoc/0/top_level.rbs +97 -0
  931. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/resolv/0/manifest.yaml +3 -0
  932. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/resolv/0/resolv.rbs +1787 -0
  933. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/ripper/0/ripper.rbs +1654 -0
  934. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/securerandom/0/manifest.yaml +2 -0
  935. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/securerandom/0/securerandom.rbs +49 -0
  936. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/shellwords/0/shellwords.rbs +229 -0
  937. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/singleton/0/singleton.rbs +137 -0
  938. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/addrinfo.rbs +666 -0
  939. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/basic_socket.rbs +590 -0
  940. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/constants.rbs +2295 -0
  941. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/ip_socket.rbs +94 -0
  942. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/socket.rbs +4170 -0
  943. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/socket_error.rbs +5 -0
  944. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/tcp_server.rbs +192 -0
  945. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/tcp_socket.rbs +87 -0
  946. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/udp_socket.rbs +133 -0
  947. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/unix_server.rbs +169 -0
  948. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/socket/0/unix_socket.rbs +172 -0
  949. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/stringio/0/stringio.rbs +1682 -0
  950. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/strscan/0/string_scanner.rbs +1648 -0
  951. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tempfile/0/manifest.yaml +3 -0
  952. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tempfile/0/tempfile.rbs +483 -0
  953. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/time/0/time.rbs +434 -0
  954. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/timeout/0/timeout.rbs +132 -0
  955. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tmpdir/0/tmpdir.rbs +69 -0
  956. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/cyclic.rbs +8 -0
  957. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/interfaces.rbs +20 -0
  958. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/tsort/0/tsort.rbs +410 -0
  959. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/common.rbs +621 -0
  960. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/file.rbs +118 -0
  961. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ftp.rbs +13 -0
  962. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/generic.rbs +1111 -0
  963. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/http.rbs +104 -0
  964. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/https.rbs +14 -0
  965. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ldap.rbs +230 -0
  966. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ldaps.rbs +14 -0
  967. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/mailto.rbs +92 -0
  968. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/rfc2396_parser.rbs +189 -0
  969. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/rfc3986_parser.rbs +2 -0
  970. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/ws.rbs +13 -0
  971. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/uri/0/wss.rbs +9 -0
  972. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/yaml/0/manifest.yaml +2 -0
  973. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/yaml/0/yaml.rbs +1 -0
  974. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/buf_error.rbs +10 -0
  975. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/data_error.rbs +10 -0
  976. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/deflate.rbs +211 -0
  977. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/error.rbs +20 -0
  978. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/crc_error.rbs +12 -0
  979. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/error.rbs +23 -0
  980. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/length_error.rbs +12 -0
  981. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file/no_footer.rbs +11 -0
  982. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_file.rbs +156 -0
  983. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_reader.rbs +293 -0
  984. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/gzip_writer.rbs +169 -0
  985. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/inflate.rbs +180 -0
  986. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/mem_error.rbs +10 -0
  987. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/need_dict.rbs +13 -0
  988. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/stream_end.rbs +11 -0
  989. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/stream_error.rbs +11 -0
  990. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/version_error.rbs +11 -0
  991. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/zlib.rbs +449 -0
  992. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/stdlib/zlib/0/zstream.rbs +200 -0
  993. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/wasm/README.md +109 -0
  994. data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/wasm/rbs_wasm.c +479 -0
  995. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/LICENSE +19 -0
  996. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/README.md +135 -0
  997. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/datetime.rb +54 -0
  998. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/dumper.rb +182 -0
  999. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/errors.rb +17 -0
  1000. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/inline_table.rb +18 -0
  1001. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/keyvalue.rb +45 -0
  1002. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/parser.rb +296 -0
  1003. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/string.rb +41 -0
  1004. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/table.rb +34 -0
  1005. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/table_array.rb +43 -0
  1006. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb/version.rb +5 -0
  1007. data/vendor/bundle/ruby/3.4.0/gems/toml-rb-6.0.0/lib/toml-rb.rb +90 -0
  1008. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/Gemfile +4 -0
  1009. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/LICENSE.txt +22 -0
  1010. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/README.md +72 -0
  1011. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/Rakefile +10 -0
  1012. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/bin/console +14 -0
  1013. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/bin/setup +8 -0
  1014. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/lib/tsort.rb +455 -0
  1015. data/vendor/bundle/ruby/3.4.0/gems/tsort-0.2.0/tsort.gemspec +29 -0
  1016. data/vendor/bundle/ruby/3.4.0/specifications/drb-2.2.3.gemspec +22 -0
  1017. data/vendor/bundle/ruby/3.4.0/specifications/logger-1.7.0.gemspec +22 -0
  1018. data/vendor/bundle/ruby/3.4.0/specifications/minitest-6.0.6.gemspec +35 -0
  1019. data/vendor/bundle/ruby/3.4.0/specifications/prism-1.9.0.gemspec +24 -0
  1020. data/vendor/bundle/ruby/3.4.0/specifications/rake-13.4.2.gemspec +26 -0
  1021. data/vendor/bundle/ruby/3.4.0/specifications/rake-compiler-1.3.2.gemspec +33 -0
  1022. data/vendor/bundle/ruby/3.4.0/specifications/rake-compiler-dock-1.12.0.gemspec +28 -0
  1023. data/vendor/bundle/ruby/3.4.0/specifications/rb_sys-0.9.130.gemspec +29 -0
  1024. data/vendor/bundle/ruby/3.4.0/specifications/rbs-4.2.0.gemspec +33 -0
  1025. data/vendor/bundle/ruby/3.4.0/specifications/toml-rb-6.0.0.gemspec +27 -0
  1026. data/vendor/bundle/ruby/3.4.0/specifications/tsort-0.2.0.gemspec +23 -0
  1027. data/vendor/cache/Cargo.toml +21 -0
  1028. data/vendor/cache/LICENSE +21 -0
  1029. data/vendor/cache/README.md +5 -0
  1030. data/vendor/cache/src/hash.rs +85 -0
  1031. data/vendor/cache/src/lib.rs +751 -0
  1032. data/vendor/cache/src/loom_tests.rs +340 -0
  1033. data/vendor/cache/src/s3fifo.rs +648 -0
  1034. data/vendor/cache/src/sync.rs +25 -0
  1035. data/vendor/cache/src/tests.rs +260 -0
  1036. data/vendor/compaction/Cargo.toml +32 -0
  1037. data/vendor/compaction/LICENSE +21 -0
  1038. data/vendor/compaction/README.md +5 -0
  1039. data/vendor/compaction/src/blob.rs +478 -0
  1040. data/vendor/compaction/src/cursor.rs +700 -0
  1041. data/vendor/compaction/src/gc.rs +802 -0
  1042. data/vendor/compaction/src/job.rs +861 -0
  1043. data/vendor/compaction/src/lib.rs +102 -0
  1044. data/vendor/compaction/src/merge.rs +995 -0
  1045. data/vendor/compaction/src/picker.rs +681 -0
  1046. data/vendor/compaction/src/resolver.rs +1346 -0
  1047. data/vendor/engine/Cargo.toml +56 -0
  1048. data/vendor/engine/LICENSE +21 -0
  1049. data/vendor/engine/README.md +5 -0
  1050. data/vendor/engine/src/admission.rs +421 -0
  1051. data/vendor/engine/src/catalog.rs +1233 -0
  1052. data/vendor/engine/src/check.rs +1386 -0
  1053. data/vendor/engine/src/clock.rs +244 -0
  1054. data/vendor/engine/src/clock_loom.rs +482 -0
  1055. data/vendor/engine/src/close_gate.rs +325 -0
  1056. data/vendor/engine/src/compact.rs +1509 -0
  1057. data/vendor/engine/src/engine/hooks.rs +1654 -0
  1058. data/vendor/engine/src/engine/info.rs +229 -0
  1059. data/vendor/engine/src/engine.rs +6114 -0
  1060. data/vendor/engine/src/error.rs +490 -0
  1061. data/vendor/engine/src/feed.rs +960 -0
  1062. data/vendor/engine/src/feed_reader.rs +1600 -0
  1063. data/vendor/engine/src/flush.rs +839 -0
  1064. data/vendor/engine/src/flushed_roots.rs +158 -0
  1065. data/vendor/engine/src/flushed_through_loom.rs +77 -0
  1066. data/vendor/engine/src/health.rs +201 -0
  1067. data/vendor/engine/src/large.rs +372 -0
  1068. data/vendor/engine/src/large_settle.rs +201 -0
  1069. data/vendor/engine/src/lib.rs +112 -0
  1070. data/vendor/engine/src/load_slot.rs +324 -0
  1071. data/vendor/engine/src/maintenance.rs +935 -0
  1072. data/vendor/engine/src/manifest/flight.rs +563 -0
  1073. data/vendor/engine/src/manifest.rs +1516 -0
  1074. data/vendor/engine/src/nonblocking.rs +603 -0
  1075. data/vendor/engine/src/options.rs +334 -0
  1076. data/vendor/engine/src/position.rs +125 -0
  1077. data/vendor/engine/src/purge_guard.rs +220 -0
  1078. data/vendor/engine/src/read/keys.rs +1049 -0
  1079. data/vendor/engine/src/read/knn.rs +423 -0
  1080. data/vendor/engine/src/read/reduce.rs +2057 -0
  1081. data/vendor/engine/src/read/traverse.rs +1013 -0
  1082. data/vendor/engine/src/read.rs +2429 -0
  1083. data/vendor/engine/src/row_cache.rs +1101 -0
  1084. data/vendor/engine/src/shard/tablets.rs +3582 -0
  1085. data/vendor/engine/src/shard.rs +12215 -0
  1086. data/vendor/engine/src/snapshot.rs +1429 -0
  1087. data/vendor/engine/src/source.rs +1379 -0
  1088. data/vendor/engine/src/timer_state.rs +226 -0
  1089. data/vendor/engine/src/waker.rs +124 -0
  1090. data/vendor/engine/src/watermark_waiters.rs +674 -0
  1091. data/vendor/engine/src/write.rs +1321 -0
  1092. data/vendor/format/Cargo.toml +40 -0
  1093. data/vendor/format/LICENSE +21 -0
  1094. data/vendor/format/README.md +5 -0
  1095. data/vendor/format/src/blob.rs +101 -0
  1096. data/vendor/format/src/block.rs +1120 -0
  1097. data/vendor/format/src/bloom.rs +456 -0
  1098. data/vendor/format/src/buckets.rs +552 -0
  1099. data/vendor/format/src/bytes.rs +101 -0
  1100. data/vendor/format/src/checksum.rs +132 -0
  1101. data/vendor/format/src/compress.rs +196 -0
  1102. data/vendor/format/src/cursor.rs +110 -0
  1103. data/vendor/format/src/distance.rs +598 -0
  1104. data/vendor/format/src/error.rs +93 -0
  1105. data/vendor/format/src/exact.rs +602 -0
  1106. data/vendor/format/src/feed.rs +285 -0
  1107. data/vendor/format/src/filter.rs +157 -0
  1108. data/vendor/format/src/half.rs +182 -0
  1109. data/vendor/format/src/hash.rs +127 -0
  1110. data/vendor/format/src/hll.rs +500 -0
  1111. data/vendor/format/src/ids.rs +95 -0
  1112. data/vendor/format/src/key.rs +620 -0
  1113. data/vendor/format/src/kind_params.rs +101 -0
  1114. data/vendor/format/src/lib.rs +54 -0
  1115. data/vendor/format/src/manifest.rs +1287 -0
  1116. data/vendor/format/src/roaring.rs +865 -0
  1117. data/vendor/format/src/scan.rs +297 -0
  1118. data/vendor/format/src/shm.rs +805 -0
  1119. data/vendor/format/src/sst.rs +233 -0
  1120. data/vendor/format/src/superblock.rs +345 -0
  1121. data/vendor/format/src/value.rs +163 -0
  1122. data/vendor/format/src/varint.rs +87 -0
  1123. data/vendor/format/src/vector.rs +936 -0
  1124. data/vendor/format/src/version.rs +92 -0
  1125. data/vendor/format/src/wal.rs +999 -0
  1126. data/vendor/io/Cargo.toml +29 -0
  1127. data/vendor/io/LICENSE +21 -0
  1128. data/vendor/io/README.md +5 -0
  1129. data/vendor/io/src/async_poll.rs +44 -0
  1130. data/vendor/io/src/buf.rs +694 -0
  1131. data/vendor/io/src/completion.rs +444 -0
  1132. data/vendor/io/src/error.rs +110 -0
  1133. data/vendor/io/src/file.rs +206 -0
  1134. data/vendor/io/src/lib.rs +53 -0
  1135. data/vendor/io/src/nowait.rs +256 -0
  1136. data/vendor/io/src/os/mod.rs +149 -0
  1137. data/vendor/io/src/os/unix.rs +897 -0
  1138. data/vendor/io/src/os/windows.rs +552 -0
  1139. data/vendor/io/src/own.rs +257 -0
  1140. data/vendor/io/src/pread.rs +854 -0
  1141. data/vendor/io/src/ring_wake.rs +113 -0
  1142. data/vendor/io/src/shared.rs +410 -0
  1143. data/vendor/io/src/sim.rs +1545 -0
  1144. data/vendor/io/src/sys.rs +214 -0
  1145. data/vendor/io/src/uring.rs +1839 -0
  1146. data/vendor/io/src/vfs.rs +154 -0
  1147. data/vendor/memory/Cargo.toml +34 -0
  1148. data/vendor/memory/LICENSE +21 -0
  1149. data/vendor/memory/README.md +11 -0
  1150. data/vendor/memory/src/consolidate.rs +640 -0
  1151. data/vendor/memory/src/dedup.rs +231 -0
  1152. data/vendor/memory/src/error.rs +131 -0
  1153. data/vendor/memory/src/feed_loop.rs +572 -0
  1154. data/vendor/memory/src/forget.rs +724 -0
  1155. data/vendor/memory/src/hooks.rs +109 -0
  1156. data/vendor/memory/src/ivf.rs +204 -0
  1157. data/vendor/memory/src/layout.rs +340 -0
  1158. data/vendor/memory/src/lib.rs +61 -0
  1159. data/vendor/memory/src/recall.rs +1182 -0
  1160. data/vendor/memory/src/store.rs +1785 -0
  1161. data/vendor/memory/src/watch.rs +339 -0
  1162. data/vendor/memtable/Cargo.toml +24 -0
  1163. data/vendor/memtable/LICENSE +21 -0
  1164. data/vendor/memtable/README.md +5 -0
  1165. data/vendor/memtable/src/lib.rs +1658 -0
  1166. data/vendor/memtable/src/loom_tests.rs +274 -0
  1167. data/vendor/memtable/src/mem.rs +344 -0
  1168. data/vendor/memtable/src/tests.rs +1061 -0
  1169. data/vendor/pager/Cargo.toml +23 -0
  1170. data/vendor/pager/LICENSE +21 -0
  1171. data/vendor/pager/README.md +5 -0
  1172. data/vendor/pager/src/alloc.rs +1008 -0
  1173. data/vendor/pager/src/lib.rs +1710 -0
  1174. data/vendor/pigeonhole/Cargo.toml +42 -0
  1175. data/vendor/pigeonhole/LICENSE +21 -0
  1176. data/vendor/pigeonhole/README.md +99 -0
  1177. data/vendor/pigeonhole/src/cell.rs +829 -0
  1178. data/vendor/pigeonhole/src/check.rs +368 -0
  1179. data/vendor/pigeonhole/src/db.rs +2324 -0
  1180. data/vendor/pigeonhole/src/doc_support.rs +89 -0
  1181. data/vendor/pigeonhole/src/error.rs +257 -0
  1182. data/vendor/pigeonhole/src/feed.rs +696 -0
  1183. data/vendor/pigeonhole/src/info.rs +425 -0
  1184. data/vendor/pigeonhole/src/lib.rs +202 -0
  1185. data/vendor/pigeonhole/src/merge.rs +135 -0
  1186. data/vendor/pigeonhole/src/metrics.rs +476 -0
  1187. data/vendor/pigeonhole/src/nonblocking.rs +666 -0
  1188. data/vendor/pigeonhole/src/options.rs +2075 -0
  1189. data/vendor/pigeonhole/src/read/budget.rs +584 -0
  1190. data/vendor/pigeonhole/src/read.rs +2463 -0
  1191. data/vendor/pigeonhole/src/recovery.rs +876 -0
  1192. data/vendor/pigeonhole/src/retry.rs +358 -0
  1193. data/vendor/pigeonhole/src/set.rs +103 -0
  1194. data/vendor/pigeonhole/src/table.rs +861 -0
  1195. data/vendor/pigeonhole/src/vector.rs +351 -0
  1196. data/vendor/pigeonhole/src/write.rs +2815 -0
  1197. data/vendor/runtime/Cargo.toml +21 -0
  1198. data/vendor/runtime/LICENSE +21 -0
  1199. data/vendor/runtime/README.md +5 -0
  1200. data/vendor/runtime/src/completion.rs +629 -0
  1201. data/vendor/runtime/src/drivers.rs +1175 -0
  1202. data/vendor/runtime/src/lib.rs +1546 -0
  1203. data/vendor/runtime/src/pool.rs +992 -0
  1204. data/vendor/runtime/src/sched.rs +809 -0
  1205. data/vendor/runtime/src/signal.rs +532 -0
  1206. data/vendor/runtime/src/submit_gate.rs +144 -0
  1207. data/vendor/shm/Cargo.toml +24 -0
  1208. data/vendor/shm/LICENSE +21 -0
  1209. data/vendor/shm/README.md +5 -0
  1210. data/vendor/shm/src/lib.rs +427 -0
  1211. data/vendor/shm/src/lock.rs +153 -0
  1212. data/vendor/shm/src/region.rs +1609 -0
  1213. data/vendor/sst/Cargo.toml +26 -0
  1214. data/vendor/sst/LICENSE +21 -0
  1215. data/vendor/sst/README.md +5 -0
  1216. data/vendor/sst/src/blob.rs +380 -0
  1217. data/vendor/sst/src/iter.rs +803 -0
  1218. data/vendor/sst/src/lib.rs +695 -0
  1219. data/vendor/sst/src/reader.rs +814 -0
  1220. data/vendor/sst/src/writer.rs +596 -0
  1221. data/vendor/text/Cargo.toml +26 -0
  1222. data/vendor/text/LICENSE +21 -0
  1223. data/vendor/text/README.md +9 -0
  1224. data/vendor/text/src/error.rs +108 -0
  1225. data/vendor/text/src/fuzzy.rs +265 -0
  1226. data/vendor/text/src/highlight.rs +236 -0
  1227. data/vendor/text/src/index.rs +1152 -0
  1228. data/vendor/text/src/layout.rs +424 -0
  1229. data/vendor/text/src/lib.rs +75 -0
  1230. data/vendor/text/src/maxscore.rs +658 -0
  1231. data/vendor/text/src/query.rs +450 -0
  1232. data/vendor/text/src/search.rs +569 -0
  1233. data/vendor/text/src/sloppy.rs +460 -0
  1234. data/vendor/text/src/tokenizer.rs +163 -0
  1235. data/vendor/vector/Cargo.toml +28 -0
  1236. data/vendor/vector/LICENSE +21 -0
  1237. data/vendor/vector/README.md +9 -0
  1238. data/vendor/vector/src/error.rs +63 -0
  1239. data/vendor/vector/src/half.rs +167 -0
  1240. data/vendor/vector/src/hooks.rs +135 -0
  1241. data/vendor/vector/src/index.rs +2690 -0
  1242. data/vendor/vector/src/layout.rs +102 -0
  1243. data/vendor/vector/src/lib.rs +52 -0
  1244. data/vendor/vector/src/point.rs +500 -0
  1245. data/vendor/vector/src/rebalancer.rs +200 -0
  1246. data/vendor/vector/src/registry.rs +81 -0
  1247. data/vendor/wal/Cargo.toml +25 -0
  1248. data/vendor/wal/LICENSE +21 -0
  1249. data/vendor/wal/README.md +5 -0
  1250. data/vendor/wal/src/feed.rs +610 -0
  1251. data/vendor/wal/src/foreground.rs +122 -0
  1252. data/vendor/wal/src/lib.rs +458 -0
  1253. data/vendor/wal/src/mem.rs +166 -0
  1254. data/vendor/wal/src/recovery.rs +426 -0
  1255. data/vendor/wal/src/stream.rs +2382 -0
  1256. metadata +1310 -0
@@ -0,0 +1,2075 @@
1
+ use std::path::PathBuf;
2
+ use std::sync::Arc;
3
+ use std::time::Duration;
4
+
5
+ use crate::Durability;
6
+ use pigeonhole_engine::{
7
+ CachePriority, CompactionStyle, Compression, EngineOptions, FamilyKind, FamilyOptions,
8
+ };
9
+ use pigeonhole_io::VfsRef;
10
+
11
+ use crate::MergeOperator;
12
+
13
+ /// Name of the built-in `i64` add operator, which counter families sum with.
14
+ pub(crate) const I64_ADD: &str = "pigeonhole.i64_add";
15
+ /// The built-in `i64` minimum, the operator of a min family (D294).
16
+ const I64_MIN: &str = "pigeonhole.i64_min";
17
+ /// The built-in `i64` maximum, the operator of a max family (D294).
18
+ const I64_MAX: &str = "pigeonhole.i64_max";
19
+ /// The built-in HyperLogLog union, the operator of an HLL family (D294).
20
+ const HLL: &str = "pigeonhole.hll";
21
+
22
+ /// `n` days, for TTLs: `Family::default().ttl(days(30))`. Saturates instead of overflowing.
23
+ pub fn days(n: u64) -> Duration {
24
+ Duration::from_secs(n.saturating_mul(86_400))
25
+ }
26
+
27
+ /// Database options. Process-local: nothing here is stored in the file, so reopening with
28
+ /// different options changes them. Zero config is valid.
29
+ ///
30
+ /// ```
31
+ /// use pigeonhole::{Durability, Options};
32
+ ///
33
+ /// let options = Options::default()
34
+ /// .durability(Durability::Buffered)
35
+ /// .shards(2)
36
+ /// .memtable_budget(8 << 20)
37
+ /// .block_cache(64 << 20);
38
+ /// # let _ = options;
39
+ /// ```
40
+ #[derive(Debug, Clone)]
41
+ pub struct Options {
42
+ durability: Durability,
43
+ shards: usize,
44
+ compaction_cores: Option<usize>,
45
+ pin_threads: bool,
46
+ memtable_budget: u64,
47
+ block_cache: Option<usize>,
48
+ row_cache: usize,
49
+ row_cache_max_row: Option<usize>,
50
+ counter_checkpoint_steps: Option<u64>,
51
+ row_cache_get_fill: Option<bool>,
52
+ nowait_reads: Option<bool>,
53
+ row_cache_families: Vec<(String, String)>,
54
+ shm_dir: Option<PathBuf>,
55
+ reader_slots: u32,
56
+ create_if_missing: bool,
57
+ merge_operators: Vec<Arc<dyn MergeOperator>>,
58
+ read_only_fallback: bool,
59
+ read_only: bool,
60
+ allow_fuse: bool,
61
+ io_backend: Option<IoBackend>,
62
+ direct_io: Option<bool>,
63
+ vfs: Option<VfsRef>,
64
+ wal_segment_size: Option<u64>,
65
+ tablet_changes: bool,
66
+ tablet_packing: bool,
67
+ tablet_balance: Option<(Duration, u64, u64)>,
68
+ write_stall_timeout: Option<Duration>,
69
+ commit_spin: Option<Duration>,
70
+ shard_spin: Option<Duration>,
71
+ shard_spin_cap: Option<Duration>,
72
+ shard_threads: Option<usize>,
73
+ adaptive_shard_threads: bool,
74
+ background_workers: usize,
75
+ cpu_profile: CpuProfile,
76
+ auto_recover: Recovery,
77
+ change_feed: Option<FeedRetention>,
78
+ /// `change_feed_off()`: no feed, and nothing inherited.
79
+ feed_off: bool,
80
+ feed_tables: Option<Vec<String>>,
81
+ }
82
+
83
+ /// How much committed history the change feed keeps (D310, [`Options::change_feed`]).
84
+ ///
85
+ /// The history is the write-ahead log itself: with a feed, the log keeps `bytes` of it past
86
+ /// the point that is already in the main file, for the whole database, and recycles the
87
+ /// oldest part beyond that. A writer never waits for the history: a write that would need
88
+ /// to, drops the oldest part instead. What it costs on disk is retention × (WAL bytes + the
89
+ /// bytes of overwritten large values, which their blob files keep for as long as a retained
90
+ /// record may name them); [`DatabaseInfo::feed`](crate::DatabaseInfo::feed) reports both.
91
+ ///
92
+ /// ```
93
+ /// use std::time::Duration;
94
+ /// use pigeonhole::{FeedRetention, Options};
95
+ ///
96
+ /// let retention = FeedRetention::bytes(1 << 30).age(Duration::from_secs(3600));
97
+ /// assert_eq!(retention.bytes, 1 << 30);
98
+ /// let options = Options::default().change_feed(retention);
99
+ /// # let _ = options;
100
+ /// ```
101
+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]
102
+ #[non_exhaustive]
103
+ pub struct FeedRetention {
104
+ /// History to keep for the whole database, in bytes. Rounded up to whole WAL segments
105
+ /// (64 MiB) per shard, and at least two of them per shard.
106
+ pub bytes: u64,
107
+ /// History older than this is dropped even under `bytes`. `None`, the default, keeps it
108
+ /// until `bytes` pushes it out.
109
+ pub age: Option<Duration>,
110
+ /// How long fed `Buffered` and `None` commits wait for a sync before the writer syncs
111
+ /// them in the background, so a durable subscriber (the default) sees them: `None`, the
112
+ /// default, is 100 ms, or 1 s on macOS, where a sync flushes the whole device. Commits
113
+ /// at `GroupSync` or `Sync` never wait for it.
114
+ pub sync_interval: Option<Duration>,
115
+ }
116
+
117
+ impl FeedRetention {
118
+ /// Keeps `bytes` of history, with no age limit.
119
+ pub fn bytes(bytes: u64) -> Self {
120
+ Self {
121
+ bytes,
122
+ age: None,
123
+ sync_interval: None,
124
+ }
125
+ }
126
+
127
+ /// Also drops history older than `age`.
128
+ pub fn age(mut self, age: Duration) -> Self {
129
+ self.age = Some(age);
130
+ self
131
+ }
132
+
133
+ /// Sets the background sync's interval for fed `Buffered` and `None` commits (see
134
+ /// [`sync_interval`](Self#structfield.sync_interval)).
135
+ pub fn sync_interval(mut self, interval: Duration) -> Self {
136
+ self.sync_interval = Some(interval);
137
+ self
138
+ }
139
+ }
140
+
141
+ /// Who the machine's (or container's) CPUs are for: how much of them the engine's threads
142
+ /// take by default (D289, ICR 0081). See [`Options::cpu_profile`].
143
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
144
+ #[non_exhaustive]
145
+ pub enum CpuProfile {
146
+ /// The application runs in the same process and needs CPU of its own: the engine's
147
+ /// driver and compaction threads take a share of the physical cores and leave the rest,
148
+ /// and every SMT sibling, to the application. A shard thread that handled a commit
149
+ /// polls for the next one before it sleeps for a window sized from its recent gaps
150
+ /// between commits: up to 1 ms when they come steadily, and never more poll per gap
151
+ /// than a 200 µs window would cost (D198 as amended again on 2026-10-30; #1176). The
152
+ /// default.
153
+ #[default]
154
+ Embedded,
155
+ /// The database has the machine or container to itself, and its clients reach it from
156
+ /// elsewhere (another container, over IPC or the network): flush and compaction take
157
+ /// half the physical cores instead of a quarter, and a shard thread that handled a
158
+ /// commit always polls 1 ms for the next one before it sleeps. Under a moderate steady
159
+ /// load that costs up to about two cores more than `Embedded` and trims the commit
160
+ /// tail further (D198 as amended on 2026-10-30). Shard threads are the same as with `Embedded`:
161
+ /// up to one per shard, sized to the load by default
162
+ /// ([`adaptive_shard_threads`](Options::adaptive_shard_threads)).
163
+ Server,
164
+ }
165
+
166
+ /// Which failures [`Options::auto_recover`] recovers from in place (D265, #620).
167
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
168
+ #[non_exhaustive]
169
+ pub enum Recovery {
170
+ /// Never: a failed instance stays failed until it is closed and reopened (the recovery
171
+ /// guide's procedure). The default.
172
+ #[default]
173
+ Off = 0,
174
+ /// From an I/O failure: a shard that stopped after a write or sync to its log failed
175
+ /// (`FailureCause::Io`), or a failed manifest commit to the main file.
176
+ Io = 1,
177
+ /// From any failure, a shard's panic or an internal error included. A panic is a bug
178
+ /// the same input may repeat; the budget (three recoveries in ten minutes) bounds the
179
+ /// loop, and then the instance stays failed.
180
+ Any = 2,
181
+ }
182
+
183
+ /// The engine-owned threads the defaults give (D289, ICR 0081), from the physical cores the
184
+ /// process may run on (after its affinity mask and cgroup CPU quota).
185
+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]
186
+ pub(crate) struct ThreadBudget {
187
+ /// Shards: one per physical core (D220). Data partitions, not threads.
188
+ pub(crate) shards: usize,
189
+ /// The most driver threads the shards run on: the load controller's ceiling (D289 PR 2),
190
+ /// or the fixed count `Options::shard_threads` set (`fixed`).
191
+ pub(crate) drivers: usize,
192
+ /// Whether `drivers` is fixed (`Options::shard_threads`), turning the controller off.
193
+ pub(crate) fixed: bool,
194
+ /// Flush and compaction threads (`Options::compaction_cores`).
195
+ pub(crate) compaction: usize,
196
+ }
197
+
198
+ /// The flush and compaction threads' share of the physical cores, as a fraction (numerator,
199
+ /// denominator), per profile: the profiles differ mainly here (owner, 2026-10-27; #760
200
+ /// comment 6446722456). Set by D289 PR 2's compaction-share arms (c = 2, 4, 8 at 16 cores).
201
+ fn compaction_share(profile: CpuProfile) -> (usize, usize) {
202
+ match profile {
203
+ CpuProfile::Embedded => (1, 4),
204
+ CpuProfile::Server => (1, 2),
205
+ }
206
+ }
207
+
208
+ /// How long a shard thread that handled a commit polls for the next one before it sleeps,
209
+ /// per profile (D198, amended 2026-10-30; #760). `Embedded` keeps the engine's 200 µs: a
210
+ /// longer window costs up to about two cores under a moderate steady load, which an
211
+ /// application sharing the CPU (a laptop, a CPU-limited container) should not pay. `Server`
212
+ /// polls 1 ms, which took sparse-wide's `Buffered` put p99 from 49.8 to 27.4 µs on the
213
+ /// reference machine.
214
+ fn shard_spin_default(profile: CpuProfile) -> Option<Duration> {
215
+ match profile {
216
+ CpuProfile::Embedded => None,
217
+ CpuProfile::Server => Some(Duration::from_millis(1)),
218
+ }
219
+ }
220
+
221
+ /// The cap of `Embedded`'s adaptive window (D198's third amendment, #1176): each shard thread polls up to 1 ms when
222
+ /// its recent gaps between commits make that cost no more poll per gap than the fixed 200
223
+ /// µs window could. On the reference machine that took sparse-wide's default-durability put
224
+ /// p99 from 390 to 122 µs and its `Buffered` put p99 to `Server`'s, at `Embedded`'s CPU under
225
+ /// a paced 1K and 4K commits/s, and 0.3 cores more at 20K. `Server` keeps its fixed 1 ms.
226
+ fn shard_spin_cap_default(profile: CpuProfile) -> Option<Duration> {
227
+ match profile {
228
+ CpuProfile::Embedded => Some(Duration::from_millis(1)),
229
+ CpuProfile::Server => None,
230
+ }
231
+ }
232
+
233
+ /// D289's CPU budget for `cores` physical cores under `profile`.
234
+ /// - **Drivers:** the load controller's ceiling is one per physical core, so a store under full
235
+ /// load keeps a thread per shard's throughput and a light one shrinks to a few (owner,
236
+ /// 2026-10-27). An explicit `drivers` fixes the count instead.
237
+ /// - **Compaction:** the profile's share of the cores, scaling with them (D252's fixed cap of
238
+ /// four is gone), at most one per shard: a shard runs one compaction at a time.
239
+ ///
240
+ /// Explicit settings win and are kept as given; derived counts are at least 1.
241
+ pub(crate) fn thread_budget(
242
+ cores: usize,
243
+ profile: CpuProfile,
244
+ shards: Option<usize>,
245
+ drivers: Option<usize>,
246
+ compaction: Option<usize>,
247
+ ) -> ThreadBudget {
248
+ let cores = cores.max(1);
249
+ let shards = shards.unwrap_or(cores).max(1);
250
+ let (num, den) = compaction_share(profile);
251
+ ThreadBudget {
252
+ shards,
253
+ drivers: drivers.unwrap_or(shards),
254
+ fixed: drivers.is_some(),
255
+ compaction: compaction.unwrap_or_else(|| (cores * num / den).clamp(1, shards)),
256
+ }
257
+ }
258
+
259
+ /// The row cache's default capacity (D216): a quarter of the default block cache. On ycsb-c
260
+ /// it answers about three gets in four from the cache; more memory buys few more hits.
261
+ const DEFAULT_ROW_CACHE: usize = 64 << 20;
262
+
263
+ /// Reader processes that can attach at once by default: 128 slots of 64 bytes, inside the
264
+ /// padding before the 2 MiB-aligned arenas, so they cost no space.
265
+ const DEFAULT_READER_SLOTS: u32 = 128;
266
+
267
+ /// The most reader slots: 4 MiB of slots in the shared-memory file, which the writer scans
268
+ /// for dead readers every 250 ms.
269
+ const MAX_READER_SLOTS: u32 = 65_536;
270
+
271
+ impl Default for Options {
272
+ fn default() -> Self {
273
+ Self {
274
+ durability: Durability::GroupSync,
275
+ shards: 0,
276
+ compaction_cores: None,
277
+ pin_threads: true,
278
+ memtable_budget: 64 << 20,
279
+ block_cache: None,
280
+ row_cache: DEFAULT_ROW_CACHE,
281
+ row_cache_max_row: None,
282
+ counter_checkpoint_steps: None,
283
+ row_cache_get_fill: None,
284
+ nowait_reads: None,
285
+ row_cache_families: Vec::new(),
286
+ shm_dir: None,
287
+ reader_slots: DEFAULT_READER_SLOTS,
288
+ create_if_missing: true,
289
+ merge_operators: Vec::new(),
290
+ read_only_fallback: false,
291
+ read_only: false,
292
+ allow_fuse: false,
293
+ io_backend: None,
294
+ direct_io: None,
295
+ vfs: None,
296
+ wal_segment_size: None,
297
+ tablet_changes: true,
298
+ tablet_packing: true,
299
+ tablet_balance: None,
300
+ write_stall_timeout: None,
301
+ commit_spin: None,
302
+ shard_spin: None,
303
+ shard_spin_cap: None,
304
+ shard_threads: None,
305
+ adaptive_shard_threads: true,
306
+ background_workers: 0,
307
+ cpu_profile: CpuProfile::Embedded,
308
+ auto_recover: Recovery::Off,
309
+ change_feed: None,
310
+ feed_off: false,
311
+ feed_tables: None,
312
+ }
313
+ }
314
+ }
315
+
316
+ impl Options {
317
+ /// Writer default durability (default [`Durability::GroupSync`]).
318
+ pub fn durability(mut self, durability: Durability) -> Self {
319
+ self.durability = durability;
320
+ self
321
+ }
322
+
323
+ /// Number of shards, the data partitions each row belongs to (default: one per physical
324
+ /// core the process may run on, D220; SMT siblings count once, and a cgroup CPU quota
325
+ /// still caps it). Engine-owned shards run on up to a thread each, as few as the load
326
+ /// needs ([`adaptive_shard_threads`](Options::adaptive_shard_threads), on by default),
327
+ /// unless [`shard_threads`](Options::shard_threads) fixes the count (D289).
328
+ /// `1` is a valid configuration. **Unset, an existing database with a change feed keeps
329
+ /// the shard count its last open recorded**, since another count ends the feed's history
330
+ /// (D310's amendment). Set it to reshard on purpose; a feed then expires with "the shard
331
+ /// count changed".
332
+ pub fn shards(mut self, n: usize) -> Self {
333
+ self.shards = n;
334
+ self
335
+ }
336
+
337
+ /// Dedicate `k` threads to flush and compaction (pinned when
338
+ /// [`pin_threads`](Options::pin_threads) is on); `0` runs them on the shard threads, in
339
+ /// time slices between commits.
340
+ ///
341
+ /// - **Default (D289, ICR 0081):** engine-owned mode starts a quarter of the physical
342
+ /// cores (half with [`CpuProfile::Server`]), at least one and at most one per shard
343
+ /// (16 cores: 4, or 8 with `Server`). On a shard thread a flush or
344
+ /// compaction slice holds up every commit queued behind it for up to half a
345
+ /// millisecond, which is most of the write tail on contended workloads.
346
+ /// - **Pinning:** they take the CPUs after the shards' (the shards' SMT siblings first).
347
+ /// Where there are too few free CPUs for both, the shards are pinned and these run
348
+ /// unpinned.
349
+ /// - **Application-owned mode** starts no threads, so its default is `0`, and
350
+ /// [`Pigeonhole::open_application_owned`](crate::Pigeonhole::open_application_owned)
351
+ /// fails with [`ErrorCode::InvalidArgument`](crate::ErrorCode::InvalidArgument) when
352
+ /// `k > 0` (decision D40); flush and compaction then run on the shards you drive, or
353
+ /// on background workers ([`Options::background_workers`], D284).
354
+ pub fn compaction_cores(mut self, k: usize) -> Self {
355
+ self.compaction_cores = Some(k);
356
+ self
357
+ }
358
+
359
+ /// Pin each shard thread, and each [`compaction_cores`](Options::compaction_cores)
360
+ /// thread, to a CPU of its own (default on, D235). Engine-owned mode only:
361
+ /// [`Pigeonhole::open_application_owned`](crate::Pigeonhole::open_application_owned)
362
+ /// runs shards on your threads, which you place yourself.
363
+ ///
364
+ /// - **Where:** the CPUs come from the set the opening thread may run on (its affinity
365
+ /// mask: `taskset`, a cpuset, a container's CPUs), one per physical core first, then
366
+ /// the cores' SMT siblings (D220). Threads are never pinned outside that set.
367
+ /// - **When it doesn't pin:** threads run unpinned, and the open still succeeds, where
368
+ /// the platform has no hard thread affinity (macOS: affinity tags are only hints), a
369
+ /// CPU quota (a cgroup `cpu.max`, not a cpuset) is narrower than the affinity set,
370
+ /// there are fewer free CPUs in the set than threads (never two pinned threads on one
371
+ /// CPU; with room for the shards only, just the compaction threads run unpinned), or
372
+ /// the OS refuses a pin. [`Pigeonhole::engine_metrics`](crate::Pigeonhole::engine_metrics)
373
+ /// reports how many threads are pinned (`threads_started`, `threads_pinned`) and why
374
+ /// not (`unpinned_reason`).
375
+ /// - **Several databases in one process** share the set: each pins to CPUs the others
376
+ /// don't hold, and one that finds too few free runs unpinned.
377
+ /// - **Several processes on one host** don't see each other's pins and would pin onto
378
+ /// the same CPUs. Give each process its own CPUs (start it under an affinity mask or
379
+ /// in its own cpuset), or turn this off with `pin_threads(false)`. There is no option
380
+ /// to name cores: the affinity mask chooses them.
381
+ ///
382
+ /// ```
383
+ /// use pigeonhole::Options;
384
+ ///
385
+ /// // Several processes sharing one host's CPUs: leave placement to the OS.
386
+ /// let options = Options::default().pin_threads(false);
387
+ /// # let _ = options;
388
+ /// ```
389
+ pub fn pin_threads(mut self, yes: bool) -> Self {
390
+ self.pin_threads = yes;
391
+ self
392
+ }
393
+
394
+ /// Memtable arena per shard, in bytes (default 64 MiB): the in-memory write buffer, also
395
+ /// the size of the shared-memory arena. Data beyond it is flushed into the file, so it
396
+ /// does not bound the database size; it bounds the largest value and batch. A batch
397
+ /// whose cells need more than about half of it fails with
398
+ /// [`ErrorCode::BatchTooLarge`](crate::ErrorCode::BatchTooLarge).
399
+ ///
400
+ /// The shared-memory region holds every shard's arena (each rounded up to 2 MiB) plus
401
+ /// about 12 MiB of views, reader slots and row epochs, 268 MiB for the default budget on 4 CPUs: on
402
+ /// Linux, memory in `/dev/shm` (or a file
403
+ /// in [`shm_dir`](Options::shm_dir)), used only as the memtables fill. Opening checks
404
+ /// that the filesystem has that much free and fails with
405
+ /// [`ErrorCode::ShmUnavailable`](crate::ErrorCode::ShmUnavailable) if it does not.
406
+ pub fn memtable_budget(mut self, bytes: u64) -> Self {
407
+ self.memtable_budget = bytes;
408
+ self
409
+ }
410
+
411
+ /// How long a write, `flush` or `compact` may wait before it fails with
412
+ /// [`ErrorCode::Busy`](crate::ErrorCode::Busy) (default 30 s). Two waits count:
413
+ /// - **Memtable room.** A commit that finds its shard's arena full, or a `flush` or
414
+ /// `compact` with no room for fresh memtables, waits while flushes free room
415
+ /// (snapshots or a slow disk can hold it). Each call's wait counts from when it began
416
+ /// waiting, however long the shard has been short of room for the calls ahead of it
417
+ /// (D240). The start is kept to the millisecond, so `Busy` can come up to 1 ms before
418
+ /// the timeout as the caller measures it.
419
+ /// - **A tablet change.** A commit whose rows are being split, merged or moved between
420
+ /// shards waits for the change, and a cross-shard commit that a participant refuses
421
+ /// because of one is retried, as often as needed (D241). So is a cross-shard commit a
422
+ /// participant refuses because it overlaps another commit's undecided write (D249).
423
+ /// These count from when the commit was submitted.
424
+ ///
425
+ /// An L0 write stall (compaction falling behind) slows commits down but never fails
426
+ /// them. A commit that fails with `Busy` was not committed: back off and retry it.
427
+ /// Latency-sensitive applications can set a shorter timeout and retry later; bulk loaders
428
+ /// can wait longer. `Duration::ZERO` refuses as soon as a wait would begin. On a clock
429
+ /// that does not move (a simulator's), a wait nothing can end is refused at once whatever
430
+ /// this says.
431
+ ///
432
+ /// ```
433
+ /// use std::time::Duration;
434
+ /// use pigeonhole::Options;
435
+ ///
436
+ /// let options = Options::default().write_stall_timeout(Duration::from_millis(500));
437
+ /// # let _ = options;
438
+ /// ```
439
+ pub fn write_stall_timeout(mut self, timeout: Duration) -> Self {
440
+ self.write_stall_timeout = Some(timeout);
441
+ self
442
+ }
443
+
444
+ /// Recovers a failed instance in place (D265, #620): with [`Recovery::Io`] or
445
+ /// [`Recovery::Any`], a supervisor thread waits for a failure and, on one the setting
446
+ /// covers, closes the failed engine keeping its writer lock, reopens the same path on it
447
+ /// and swaps the new engine in behind every handle. Tables keep working; a snapshot, a
448
+ /// scan or a transaction from before fails with `SnapshotExpired`, and an operation that
449
+ /// arrives during the pause waits up to [`write_stall_timeout`](Self::write_stall_timeout)
450
+ /// for the swap (`Busy` past it: not committed, retry); a commit that was in flight when
451
+ /// the shard failed comes back as `Busy` too. At most three recoveries in ten minutes,
452
+ /// with a backoff of 0, 1 and 4 seconds before the reopen; past the budget, on a reopen
453
+ /// that fails with `Corruption`, `UnsupportedFormat`, `NoSpace`, `WriterLocked` or
454
+ /// `ShmVersionMismatch`, or when the failed engine's close has not returned within four
455
+ /// write-stall timeouts (a device that never answers), the instance stays failed as with
456
+ /// [`Recovery::Off`].
457
+ /// [`Pigeonhole::recovery_stats`](crate::Pigeonhole::recovery_stats) reports it. Refused
458
+ /// by [`Pigeonhole::open_application_owned`](crate::Pigeonhole::open_application_owned).
459
+ /// See the user guide's "Recovering from a failed shard".
460
+ ///
461
+ /// ```
462
+ /// use std::time::Duration;
463
+ /// use pigeonhole::{ErrorCode, Family, Options, Pigeonhole, Recovery};
464
+ ///
465
+ /// # fn main() -> pigeonhole::Result<()> {
466
+ /// # let dir = pigeonhole::doc_support::temp_dir();
467
+ /// let db = Pigeonhole::open(
468
+ /// dir.join("app.phdb"),
469
+ /// Options::default()
470
+ /// .shards(1)
471
+ /// .auto_recover(Recovery::Io)
472
+ /// .write_stall_timeout(Duration::from_secs(5)),
473
+ /// )?;
474
+ /// let t = db.table("users")?.family("profile", Family::default()).create_if_missing()?;
475
+ /// // A commit during a recovery waits for the swap; past the timeout, or if it was in
476
+ /// // flight at the failure, it comes back as `Busy` and is simply retried.
477
+ /// let mut tries = 0;
478
+ /// loop {
479
+ /// match t.mutate(b"u1").put("profile", b"name", b"Ada").commit() {
480
+ /// Ok(_) => break,
481
+ /// Err(e) if e.code() == ErrorCode::Busy && tries < 3 => tries += 1,
482
+ /// Err(e) => return Err(e),
483
+ /// }
484
+ /// }
485
+ /// let stats = db.recovery_stats();
486
+ /// assert_eq!((stats.generation, stats.recoveries, stats.gave_up), (1, 0, false));
487
+ /// # db.close()?;
488
+ /// # Ok(())
489
+ /// # }
490
+ /// ```
491
+ pub fn auto_recover(mut self, recovery: Recovery) -> Self {
492
+ self.auto_recover = recovery;
493
+ self
494
+ }
495
+
496
+ /// A test and bench hook (ICR 0085), only with the `__unstable-hooks` feature and outside
497
+ /// the API: the default suits applications.
498
+ ///
499
+ /// How long a thread waiting for its buffered (or non-durable) commit polls for the
500
+ /// result before it sleeps (default 50 µs). A shard usually answers within a few
501
+ /// microseconds, and putting the thread to sleep and waking it costs that again or more
502
+ /// (D198). A cross-shard commit takes two rounds, so the default covers those too (D253). A durable commit waits for a disk sync and sleeps at once. A wait that keeps
503
+ /// finding nothing polls less often. `Duration::ZERO` always sleeps at once: for
504
+ /// battery-powered or CPU-constrained hosts.
505
+ ///
506
+ /// ```
507
+ /// use std::time::Duration;
508
+ /// use pigeonhole::Options;
509
+ ///
510
+ /// let options = Options::default().commit_spin(Duration::ZERO).shard_spin(Duration::ZERO);
511
+ /// # let _ = options;
512
+ /// ```
513
+ #[cfg(feature = "__unstable-hooks")]
514
+ #[doc(hidden)]
515
+ pub fn commit_spin(mut self, window: Duration) -> Self {
516
+ self.commit_spin = Some(window);
517
+ self
518
+ }
519
+
520
+ /// A test and bench hook (ICR 0085), only with the `__unstable-hooks` feature and outside
521
+ /// the API: the default suits applications.
522
+ ///
523
+ /// How long a shard thread that just handled a commit keeps polling for the next one
524
+ /// before it sleeps (default 200 µs, sized up to 1 ms from the shard's recent gaps; a fixed
525
+ /// 1 ms with [`CpuProfile::Server`]; a window set here is fixed; D198 as amended
526
+ /// on 2026-10-19 and 2026-10-30), so a steady stream
527
+ /// of commits is taken without waking the thread each time, and a store whose clients
528
+ /// wait on each other across shards does not settle into every message costing a wake. An idle database never polls, and polls that
529
+ /// keep finding nothing poll less often. `Duration::ZERO` always sleeps at once. Ignored
530
+ /// by application-owned shards, whose loop the application runs.
531
+ #[cfg(feature = "__unstable-hooks")]
532
+ #[doc(hidden)]
533
+ pub fn shard_spin(mut self, window: Duration) -> Self {
534
+ self.shard_spin = Some(window);
535
+ self
536
+ }
537
+
538
+ /// A test and bench hook (#1176), only with the `__unstable-hooks` feature and outside
539
+ /// the API.
540
+ ///
541
+ /// Sizes each shard thread's poll from its recent idle gaps, up to `cap`: the longest
542
+ /// poll whose expected cost per gap is no more than the [`shard_spin`](Self::shard_spin)
543
+ /// window's could be. A cap at or below that window keeps the window fixed, as with no
544
+ /// cap (the default under [`CpuProfile::Server`] or with an explicit window).
545
+ #[cfg(feature = "__unstable-hooks")]
546
+ #[doc(hidden)]
547
+ pub fn shard_spin_cap(mut self, cap: Duration) -> Self {
548
+ self.shard_spin_cap = Some(cap);
549
+ self
550
+ }
551
+
552
+ /// Run the shards on `k` threads rather than one each (D289, ICR 0079): shard `i` runs
553
+ /// on thread `i % k`, and each thread takes its shards' turns one after another.
554
+ ///
555
+ /// - **Why:** a shard thread that waits for work sleeps, and a commit that finds it
556
+ /// asleep waits for the operating system to wake and schedule it, up to a scheduler
557
+ /// slice (about 1 ms on Linux) when the application's threads keep the CPUs busy.
558
+ /// Fewer threads, each busier, sleep less.
559
+ /// - **Default `0`:** up to one thread per shard, sized to the load
560
+ /// ([`adaptive_shard_threads`](Options::adaptive_shard_threads), on by default). A
561
+ /// set `k` fixes the count and turns the sizing off; `k` at or above the shard count
562
+ /// means a thread per shard.
563
+ /// - **Pinning:** the `k` threads are pinned as the shard threads are
564
+ /// ([`pin_threads`](Options::pin_threads)).
565
+ /// - Engine-owned mode only: application-owned shards run on threads you choose.
566
+ ///
567
+ /// ```
568
+ /// use pigeonhole::Options;
569
+ ///
570
+ /// let options = Options::default().shards(16).shard_threads(4);
571
+ /// # let _ = options;
572
+ /// ```
573
+ pub fn shard_threads(mut self, k: usize) -> Self {
574
+ self.shard_threads = Some(k);
575
+ self
576
+ }
577
+
578
+ /// Who this machine's (or container's) CPUs are for, which sets how many threads the
579
+ /// engine starts by default (D289, ICR 0081). [`shard_threads`](Options::shard_threads)
580
+ /// and [`compaction_cores`](Options::compaction_cores) set explicitly still win, and the
581
+ /// profile fills in the rest.
582
+ ///
583
+ /// - **Shard threads, both profiles:** up to one per shard, so one per physical core at
584
+ /// most by default, and fewer while the load is light
585
+ /// ([`adaptive_shard_threads`](Options::adaptive_shard_threads)).
586
+ /// - **[`CpuProfile::Embedded`] (the default):** your application runs in this process
587
+ /// and needs CPU too. Flush and compaction take a quarter of the physical cores, and a
588
+ /// shard thread polls for the next commit before it sleeps: up to 1 ms while commits
589
+ /// come steadily, at no more poll per gap than 200 µs would cost.
590
+ /// - **[`CpuProfile::Server`]:** the database has the machine or container to itself,
591
+ /// and its clients reach it from elsewhere (another container, over IPC or the
592
+ /// network). Flush and compaction take half the physical cores, and a shard thread
593
+ /// always polls 1 ms for the next commit before it sleeps: a lower commit tail at a
594
+ /// moderate steady load, for up to about two more cores.
595
+ /// - **CPU limits:** "physical cores" means those the process may use: its affinity
596
+ /// mask and a container's CPU quota both narrow them, so a 4-CPU container sizes the
597
+ /// engine for 4 whatever the host has.
598
+ /// - Engine-owned mode only: application-owned shards and workers run on threads you
599
+ /// start yourself (D40).
600
+ ///
601
+ /// ```
602
+ /// use pigeonhole::{CpuProfile, Options};
603
+ ///
604
+ /// // A database container the application talks to over the network.
605
+ /// let options = Options::default().cpu_profile(CpuProfile::Server);
606
+ /// # let _ = options;
607
+ /// ```
608
+ pub fn cpu_profile(mut self, profile: CpuProfile) -> Self {
609
+ self.cpu_profile = profile;
610
+ self
611
+ }
612
+
613
+ /// Size the shard threads to the load (D289's controller, ICR 0081). **On by default.**
614
+ /// The engine starts a thread per shard, then moves the shards of a light load onto
615
+ /// fewer threads, which sleep less, so a commit less often waits for a sleeping thread to
616
+ /// be woken; under load it spreads them out again, up to one per shard.
617
+ ///
618
+ /// - **What it gains:** a light, many-shard load's commit p99 falls from hundreds of
619
+ /// microseconds to tens. In the 2026-10-28 gate, sparse-wide's put p99 at `Buffered`
620
+ /// was 66-107 µs with the controller against 545-909 µs without, at the same
621
+ /// throughput; transfer, ycsb-a and ycsb-f were level (D289, #1015).
622
+ /// - **When to turn it off (`false`):** for a fixed thread per shard, which is the
623
+ /// behaviour before 1.0. An explicit [`shard_threads`](Options::shard_threads) also
624
+ /// turns it off: the count you set is kept.
625
+ /// - Engine-owned mode only: application-owned shards run on threads you start (D40).
626
+ ///
627
+ /// ```
628
+ /// use pigeonhole::Options;
629
+ ///
630
+ /// // A thread per shard, never resized.
631
+ /// let options = Options::default().adaptive_shard_threads(false);
632
+ /// # let _ = options;
633
+ /// ```
634
+ pub fn adaptive_shard_threads(mut self, on: bool) -> Self {
635
+ self.adaptive_shard_threads = on;
636
+ self
637
+ }
638
+
639
+ /// Application-owned mode only: `n` background workers for flush and compaction (D284),
640
+ /// handed out by
641
+ /// [`Pigeonhole::open_application_owned`](crate::Pigeonhole::open_application_owned)
642
+ /// for you to drive from threads you choose, as you drive the shards.
643
+ ///
644
+ /// - **Why:** with none (the default `0`), flush and compaction run on the shards, in
645
+ /// slices of up to half a millisecond that hold up the commits queued behind them.
646
+ /// - **How many:** a quarter of the shards is a good start. The engine-owned count
647
+ /// ([`compaction_cores`](Options::compaction_cores)) has its own default, which may
648
+ /// differ.
649
+ /// - Engine-owned opens ignore it: they start
650
+ /// [`compaction_cores`](Options::compaction_cores) threads of their own.
651
+ ///
652
+ /// ```
653
+ /// use pigeonhole::Options;
654
+ ///
655
+ /// let options = Options::default().shards(16).background_workers(4);
656
+ /// # let _ = options;
657
+ /// ```
658
+ pub fn background_workers(mut self, n: usize) -> Self {
659
+ self.background_workers = n;
660
+ self
661
+ }
662
+
663
+ /// Block cache capacity in bytes.
664
+ pub fn block_cache(mut self, bytes: usize) -> Self {
665
+ self.block_cache = Some(bytes);
666
+ self
667
+ }
668
+
669
+ /// Turns on the change feed's history (D310): the log keeps `retention` of committed
670
+ /// changes, a clean close keeps it, and the next open with the feed on takes it up again
671
+ /// without replaying it. With a feed, the database at rest is the main file plus its
672
+ /// `-wal-N` files and the `-feed` file beside it.
673
+ ///
674
+ /// **An open that doesn't mention the feed inherits it** (D310's amendment): if the last
675
+ /// open fed, the next one with neither `change_feed` nor
676
+ /// [`change_feed_off`](Self::change_feed_off) feeds the same tables with the same
677
+ /// retention and age, so a tool that opens the file between two runs of the app
678
+ /// (`phdb load`, say) keeps the app's feed history instead of ending it.
679
+ /// [`FeedRetention::sync_interval`] is per open: an inherited feed uses the default. A new
680
+ /// database, one whose last open had the feed off, or one whose fed tables were all
681
+ /// dropped since, stays off.
682
+ pub fn change_feed(mut self, retention: FeedRetention) -> Self {
683
+ self.change_feed = Some(retention);
684
+ self.feed_off = false;
685
+ self
686
+ }
687
+
688
+ /// Turns the change feed off for this open, whatever the last open did. This ends the
689
+ /// feed's history: a subscriber's token from before can't resume past this open
690
+ /// ([`ErrorCode::FeedExpired`](crate::ErrorCode::FeedExpired)), and the retained log
691
+ /// is no longer kept.
692
+ pub fn change_feed_off(mut self) -> Self {
693
+ self.change_feed = None;
694
+ self.feed_off = true;
695
+ self
696
+ }
697
+
698
+ /// The tables the change feed covers, by name (default: every table, or what an
699
+ /// inherited feed covered). Each must exist when the database opens, and the feed must
700
+ /// be turned on in this open ([`change_feed`](Self::change_feed)), or the open fails with
701
+ /// [`ErrorCode::InvalidArgument`](crate::ErrorCode::InvalidArgument). A table added to
702
+ /// the list later has history from that open on.
703
+ pub fn feed_tables<I, S>(mut self, tables: I) -> Self
704
+ where
705
+ I: IntoIterator<Item = S>,
706
+ S: Into<String>,
707
+ {
708
+ self.feed_tables = Some(tables.into_iter().map(Into::into).collect());
709
+ self
710
+ }
711
+
712
+ /// Row cache capacity in bytes (default 64 MiB, D216; 0 turns it off), on top of the block
713
+ /// cache, plus about 9% of it for per-row write watermarks allocated at open. The row
714
+ /// cache keeps the newest version of each cell of small, hot family rows and serves
715
+ /// latest row reads (newest version, no time range) and point gets from it, without
716
+ /// merging the row's sources. A family row is stored the second time a read misses it,
717
+ /// so rows read once are never stored. Results are identical to uncached reads. Point
718
+ /// gets at a snapshot or in a transaction are served from it too (D290). A commit that
719
+ /// only overwrites cached cells with puts moves the cached copy forward (commits of at
720
+ /// most 16 rows and 64 mutations; the row's other families miss); any other write makes
721
+ /// it miss at once (D201). Snapshot row reads, scans and multi-version reads bypass it. Reader processes have their own
722
+ /// ([`ReaderOptions::row_cache`], D281).
723
+ pub fn row_cache(mut self, bytes: usize) -> Self {
724
+ self.row_cache = bytes;
725
+ self
726
+ }
727
+
728
+ /// Largest family row the row cache stores, in encoded bytes (about the qualifiers and
729
+ /// values plus 16 bytes a cell; default 4 KiB). Larger rows are read as usual.
730
+ pub fn row_cache_max_row(mut self, bytes: usize) -> Self {
731
+ self.row_cache_max_row = Some(bytes);
732
+ self
733
+ }
734
+
735
+ /// A counter read that folds at least `steps` increments keeps its result as the
736
+ /// counter's base, so its next reads stop there (D291; default 128, 0 turns it off). For
737
+ /// tests and benchmarks.
738
+ #[cfg(feature = "__unstable-hooks")]
739
+ #[doc(hidden)]
740
+ pub fn counter_checkpoint_steps(mut self, steps: u64) -> Self {
741
+ self.counter_checkpoint_steps = Some(steps);
742
+ self
743
+ }
744
+
745
+ /// Whether a point get that misses a row twice fills the row cache with the family row
746
+ /// (D290; default off since the owner's 2026-10-29 amendment, #1059). Off, gets are
747
+ /// served from cached rows, which row reads fill, but never fill them. For benchmarks
748
+ /// comparing the two.
749
+ #[cfg(feature = "__unstable-hooks")]
750
+ #[doc(hidden)]
751
+ pub fn row_cache_get_fill(mut self, on: bool) -> Self {
752
+ self.row_cache_get_fill = Some(on);
753
+ self
754
+ }
755
+
756
+ /// Whether a read the page cache holds is copied on the thread that submits it (D292,
757
+ /// Linux; default on), set on the database's I/O backend at open (ICR 0083). A backend
758
+ /// passed through [`Options::vfs`] is shared: every database on it sees the change. For
759
+ /// benchmarks comparing the two.
760
+ #[cfg(feature = "__unstable-hooks")]
761
+ #[doc(hidden)]
762
+ pub fn nowait_reads(mut self, on: bool) -> Self {
763
+ self.nowait_reads = Some(on);
764
+ self
765
+ }
766
+
767
+ /// Serve only these families from the row cache: call once per `(table, family)`.
768
+ /// Without any call, every family is served. Process-local, not stored in the file.
769
+ pub fn row_cache_family(mut self, table: &str, family: &str) -> Self {
770
+ self.row_cache_families
771
+ .push((table.to_owned(), family.to_owned()));
772
+ self
773
+ }
774
+
775
+ /// Put the shared-memory file in `dir` (for example a tmpfs mount) instead of the
776
+ /// memory-backed default.
777
+ pub fn shm_dir(mut self, dir: impl Into<PathBuf>) -> Self {
778
+ self.shm_dir = Some(dir.into());
779
+ self
780
+ }
781
+
782
+ /// How many reader processes ([`Pigeonhole::open_reader`](crate::Pigeonhole::open_reader))
783
+ /// can attach at once: default 128, at least 1, at most 65,536 (ICR 0055).
784
+ ///
785
+ /// Each attached reader handle holds one 64-byte slot in the shared-memory file. One more
786
+ /// fails `open_reader` with [`ErrorCode::NoReaderSlot`](crate::ErrorCode::NoReaderSlot)
787
+ /// at once, without waiting. The writer frees the slots of reader processes that exited
788
+ /// or were killed within about 250 ms. The count is fixed for a writer's lifetime: a
789
+ /// writer opened with another count builds its shared-memory file with that many.
790
+ ///
791
+ /// ```
792
+ /// use pigeonhole::Options;
793
+ ///
794
+ /// let options = Options::default().reader_slots(16);
795
+ /// # let _ = options;
796
+ /// ```
797
+ pub fn reader_slots(mut self, n: u32) -> Self {
798
+ self.reader_slots = n.clamp(1, MAX_READER_SLOTS);
799
+ self
800
+ }
801
+
802
+ /// Create the file if missing (default true).
803
+ pub fn create_if_missing(mut self, yes: bool) -> Self {
804
+ self.create_if_missing = yes;
805
+ self
806
+ }
807
+
808
+ /// Registers a merge operator, referenced by families through its name
809
+ /// ([`Family::merge_operator`]). A family naming an operator that is not registered is
810
+ /// refused at creation, and a database whose families name one opens only read-only, with
811
+ /// [`read_only_fallback`](Self::read_only_fallback), and with
812
+ /// [`ErrorCode::UnknownMergeOperator`](crate::ErrorCode::UnknownMergeOperator) otherwise.
813
+ /// Registering an operator under the built-in name `pigeonhole.i64_add` replaces it.
814
+ pub fn merge_operator(mut self, op: Arc<dyn MergeOperator>) -> Self {
815
+ self.merge_operators.push(op);
816
+ self
817
+ }
818
+
819
+ /// Open read-only instead of failing when this build cannot write the database (default
820
+ /// off; ICR 0059). Two cases:
821
+ /// - the file uses a feature a newer build added that older builds may read but not
822
+ /// write: otherwise [`ErrorCode::UnsupportedFeature`](crate::ErrorCode::UnsupportedFeature);
823
+ /// - a family names a merge operator this process has not registered: otherwise
824
+ /// [`ErrorCode::UnknownMergeOperator`](crate::ErrorCode::UnknownMergeOperator), and reads
825
+ /// of that family's merged cells fail with it.
826
+ ///
827
+ /// A handle opened read-only refuses writes, schema changes, `flush`, `compact` and
828
+ /// `shrink` with [`ErrorCode::ReadOnly`](crate::ErrorCode::ReadOnly), and writes nothing to
829
+ /// the database's files: it does not upgrade an older file's format, flush, compact or
830
+ /// mark a clean close. It replays the write-ahead log into memory, so an open whose log
831
+ /// does not fit [`memtable_budget`](Self::memtable_budget) fails with `ReadOnly`; raise
832
+ /// the budget. [`DatabaseInfo::read_only`](crate::DatabaseInfo::read_only) tells whether
833
+ /// the fallback was taken. It still holds the writer lock while open. A file that opens
834
+ /// writable is unaffected.
835
+ pub fn read_only_fallback(mut self, yes: bool) -> Self {
836
+ self.read_only_fallback = yes;
837
+ self
838
+ }
839
+
840
+ /// Open read-only, whatever the file needs (default off; ICR 0109): the open
841
+ /// [`read_only_fallback`](Self::read_only_fallback) falls back to, asked for. It writes
842
+ /// nothing to the database's files, so a tool that only reads leaves the database as it
843
+ /// found it: no format upgrade, no change-feed session (so an application's feed tokens
844
+ /// stay valid, D310), no new log segment, no flush, compaction or clean-close commit.
845
+ ///
846
+ /// Writes, schema changes, `flush`, `compact` and `shrink` fail with
847
+ /// [`ErrorCode::ReadOnly`](crate::ErrorCode::ReadOnly), and
848
+ /// [`DatabaseInfo::read_only`](crate::DatabaseInfo::read_only) is true. It replays the
849
+ /// write-ahead log into memory, so a log that doesn't fit
850
+ /// [`memtable_budget`](Self::memtable_budget) fails the open with `ReadOnly`. A missing
851
+ /// file isn't created, whatever [`create_if_missing`](Self::create_if_missing) says.
852
+ ///
853
+ /// **It is still a writer-process open in every other respect:**
854
+ /// - It takes the writer lock, which needs write access to the file, so it fails on a
855
+ /// read-only file or mount.
856
+ /// - It excludes a running writer, failing with `WriterLocked` while one has the database
857
+ /// open. To read beside a running writer, open a reader process
858
+ /// ([`Pigeonhole::open_reader`](crate::Pigeonhole::open_reader)), as `phdb` does.
859
+ /// - It creates the writer's shared-memory region ([`shm_dir`](Self::shm_dir)).
860
+ pub fn read_only(mut self, yes: bool) -> Self {
861
+ self.read_only = yes;
862
+ self
863
+ }
864
+
865
+ /// Accept a database on a FUSE filesystem (default off; decision D173). Use it only for a
866
+ /// **local** FUSE mount you trust, such as ntfs-3g or an encrypted home directory
867
+ /// (gocryptfs). FUSE byte-range locks may be local to one host, so two hosts could
868
+ /// both open the file as writers and corrupt it, and a sync may not reach stable
869
+ /// storage, so a commit acknowledged as durable could be lost in a power failure. Never
870
+ /// set it for sshfs, s3fs, gcsfuse or other network-backed FUSE mounts. Network and
871
+ /// cluster filesystems (NFS, SMB, GPFS, ...) are refused with
872
+ /// [`ErrorCode::NetworkFilesystem`](crate::ErrorCode::NetworkFilesystem) either way.
873
+ pub fn allow_fuse(mut self, yes: bool) -> Self {
874
+ self.allow_fuse = yes;
875
+ self
876
+ }
877
+
878
+ /// The I/O backend (default [`IoBackend::Auto`]: io_uring where the kernel offers it,
879
+ /// `pread` elsewhere, D218). With [`IoBackend::Uring`] the open fails with
880
+ /// [`ErrorCode::Unsupported`](crate::ErrorCode::Unsupported) where io_uring is unavailable
881
+ /// (not Linux, an old kernel, a container that blocks it); [`IoBackend::Pread`] forces the
882
+ /// thread pool everywhere.
883
+ ///
884
+ /// ```
885
+ /// use pigeonhole::{IoBackend, Options};
886
+ ///
887
+ /// let options = Options::default().io_backend(IoBackend::Auto);
888
+ /// # let _ = options;
889
+ /// ```
890
+ pub fn io_backend(mut self, backend: IoBackend) -> Self {
891
+ self.io_backend = Some(backend);
892
+ self
893
+ }
894
+
895
+ /// Read and write SST and blob extents with direct I/O (#403): `O_DIRECT` on Linux,
896
+ /// `F_NOCACHE` on macOS, `FILE_FLAG_NO_BUFFERING` on Windows, through a second handle on
897
+ /// the file, so the block cache is their only cache. Superblocks, the manifest and the
898
+ /// WAL stay buffered. A file system that refuses direct I/O keeps buffered I/O.
899
+ ///
900
+ /// Default off, which suits most databases: buffered reads use whatever memory is free
901
+ /// as cache. Turn it on when the data is much larger than RAM and
902
+ /// [`Options::block_cache`] holds at least about 1/64 of the data (its pinned SST indexes
903
+ /// and filters plus the index partitions, D215): cold gets then cost one device read
904
+ /// each without the page cache's copy. On the reference machine (64 GiB table, 1 GiB block
905
+ /// cache) cold gets measured p99 205 µs direct against 264 µs buffered on one thread, and
906
+ /// 293 against 447 µs on 16. With a block cache much smaller than the working set,
907
+ /// direct I/O is far slower than buffered.
908
+ pub fn direct_io(mut self, yes: bool) -> Self {
909
+ self.direct_io = Some(yes);
910
+ self
911
+ }
912
+
913
+ /// A test and bench hook (ICR 0085), only with the `__unstable-hooks` feature and outside
914
+ /// the API: the default suits applications.
915
+ ///
916
+ /// Let a table's tablets split, merge and move between shards (default on), so the
917
+ /// writes of one table spread over every shard. Off, each table is one tablet on one
918
+ /// shard: writes to a single table use one shard thread whatever [`shards`](Self::shards)
919
+ /// says, and only commits touching several tables run on several shards.
920
+ ///
921
+ /// On, each shard's balancer splits a tablet at 256 MiB of live data or under sustained
922
+ /// write skew, moves tablets to colder shards and merges small cold neighbours. Reads are
923
+ /// never blocked by a change. Known limits: tablet owners are not stored in the file, so
924
+ /// a reopen places the tablets again; and two commits on one row that are in flight
925
+ /// together may be applied in either order while that row's tablet moves (a commit
926
+ /// submitted after an earlier one returned is always applied after it).
927
+ ///
928
+ /// ```
929
+ /// use pigeonhole::Options;
930
+ ///
931
+ /// // Keep every table on one shard.
932
+ /// let options = Options::default().shards(4).tablet_changes(false);
933
+ /// # let _ = options;
934
+ /// ```
935
+ #[cfg(feature = "__unstable-hooks")]
936
+ #[doc(hidden)]
937
+ pub fn tablet_changes(mut self, yes: bool) -> Self {
938
+ self.tablet_changes = yes;
939
+ self
940
+ }
941
+
942
+ /// A test and bench hook (ICR 0085), only with the `__unstable-hooks` feature and outside
943
+ /// the API: the default suits applications.
944
+ ///
945
+ /// Pack a lightly written store's tablets onto few shards (default on; D217). While the
946
+ /// shards' threads are mostly idle, the balancer keeps the tablets being written on as few
947
+ /// shards as stay about half busy, so a commit seldom has to wake a sleeping shard
948
+ /// thread (a single writer over 32 shards otherwise pays a wakeup per commit). It
949
+ /// spreads them again within about a second once those shards pass 75% busy. A shard is
950
+ /// busy while its thread works or while its group fsyncs are in flight (D248), so
951
+ /// durable commits waiting on the disk keep enough shards active. Off,
952
+ /// tablets spread over every shard whatever the load. Only read with
953
+ /// [`tablet_changes`](Self::tablet_changes) on; shards the application drives
954
+ /// ([`Pigeonhole::open_application_owned`](crate::Pigeonhole::open_application_owned))
955
+ /// are never packed.
956
+ ///
957
+ /// ```
958
+ /// use pigeonhole::Options;
959
+ ///
960
+ /// // Spread over every shard even under light writes.
961
+ /// let options = Options::default().tablet_packing(false);
962
+ /// # let _ = options;
963
+ /// ```
964
+ #[cfg(feature = "__unstable-hooks")]
965
+ #[doc(hidden)]
966
+ pub fn tablet_packing(mut self, yes: bool) -> Self {
967
+ self.tablet_packing = yes;
968
+ self
969
+ }
970
+
971
+ /// Run on a custom filesystem implementation. Used by the deterministic simulation
972
+ /// suites; applications never need it.
973
+ #[cfg(feature = "__unstable-hooks")]
974
+ #[doc(hidden)]
975
+ pub fn vfs(mut self, vfs: pigeonhole_io::VfsRef) -> Self {
976
+ self.vfs = Some(vfs);
977
+ self
978
+ }
979
+
980
+ /// WAL segment size in bytes (default 64 MiB; a multiple of 32 KiB, decision D43). A test
981
+ /// hook (ICR 0005): small segments keep simulated opens fast. It also lowers the largest
982
+ /// value a commit may carry (decision D16). Applications never need it. It sizes new WAL
983
+ /// streams only: an existing database's streams keep the slot size they were made with,
984
+ /// and the change feed's retention is counted in whole segments of each stream's own
985
+ /// size (`DatabaseInfo::feed` reports what's in effect; #1471).
986
+ #[cfg(feature = "__unstable-hooks")]
987
+ #[doc(hidden)]
988
+ pub fn wal_segment_size(mut self, bytes: u64) -> Self {
989
+ self.wal_segment_size = Some(bytes);
990
+ self
991
+ }
992
+
993
+ /// Balancer tuning, a test hook (ICR 0009): a pass every `interval`, write skew acted on
994
+ /// once a shard writes `min_writes` rows in one, and size splits at `split_bytes`. The
995
+ /// simulation suites use tiny values so tablets change during short runs. Only read with
996
+ /// [`tablet_changes`](Self::tablet_changes) on. Applications never need it.
997
+ #[cfg(feature = "__unstable-hooks")]
998
+ #[doc(hidden)]
999
+ pub fn tablet_balance(mut self, interval: Duration, min_writes: u64, split_bytes: u64) -> Self {
1000
+ self.tablet_balance = Some((interval, min_writes, split_bytes));
1001
+ self
1002
+ }
1003
+ }
1004
+
1005
+ /// Options for a read-only handle in another process.
1006
+ ///
1007
+ /// ```
1008
+ /// use pigeonhole::ReaderOptions;
1009
+ ///
1010
+ /// let options = ReaderOptions::default().block_cache(32 << 20);
1011
+ /// # let _ = options;
1012
+ /// ```
1013
+ #[derive(Debug, Clone, Default)]
1014
+ pub struct ReaderOptions {
1015
+ block_cache: Option<usize>,
1016
+ shm_dir: Option<PathBuf>,
1017
+ merge_operators: Vec<Arc<dyn MergeOperator>>,
1018
+ allow_fuse: bool,
1019
+ io_backend: Option<IoBackend>,
1020
+ direct_io: Option<bool>,
1021
+ vfs: Option<VfsRef>,
1022
+ row_cache: Option<usize>,
1023
+ row_cache_max_row: Option<usize>,
1024
+ row_cache_families: Vec<(String, String)>,
1025
+ }
1026
+
1027
+ impl ReaderOptions {
1028
+ /// Row cache capacity in bytes (default 64 MiB, as the writer's; 0 turns it off; D281).
1029
+ /// Each reader process has its own, so N reader processes use up to N × 64 MiB by
1030
+ /// default, plus 16 bytes per row-epoch slot of the writer's table (4 MiB at the
1031
+ /// defaults). It serves latest row reads and point gets as
1032
+ /// [`Options::row_cache`] does in the writer, with results identical to uncached reads: a
1033
+ /// write the reader can see makes the row's cached copy miss at once, through the
1034
+ /// writer's write watermarks in shared memory. Emptied whenever the reader re-attaches to
1035
+ /// a new writer (a restart, a recovery).
1036
+ pub fn row_cache(mut self, bytes: usize) -> Self {
1037
+ self.row_cache = Some(bytes);
1038
+ self
1039
+ }
1040
+
1041
+ /// Largest family row the reader's row cache stores, as
1042
+ /// [`Options::row_cache_max_row`] (default 4 KiB).
1043
+ pub fn row_cache_max_row(mut self, bytes: usize) -> Self {
1044
+ self.row_cache_max_row = Some(bytes);
1045
+ self
1046
+ }
1047
+
1048
+ /// Serve only these families from the reader's row cache, as
1049
+ /// [`Options::row_cache_family`]: call once per `(table, family)`.
1050
+ pub fn row_cache_family(mut self, table: &str, family: &str) -> Self {
1051
+ self.row_cache_families
1052
+ .push((table.to_owned(), family.to_owned()));
1053
+ self
1054
+ }
1055
+
1056
+ /// Block cache capacity in bytes (each reader process has its own).
1057
+ pub fn block_cache(mut self, bytes: usize) -> Self {
1058
+ self.block_cache = Some(bytes);
1059
+ self
1060
+ }
1061
+
1062
+ /// Where the writer put the shared-memory file, if not the default.
1063
+ pub fn shm_dir(mut self, dir: impl Into<PathBuf>) -> Self {
1064
+ self.shm_dir = Some(dir.into());
1065
+ self
1066
+ }
1067
+
1068
+ /// Registers a merge operator.
1069
+ pub fn merge_operator(mut self, op: Arc<dyn MergeOperator>) -> Self {
1070
+ self.merge_operators.push(op);
1071
+ self
1072
+ }
1073
+
1074
+ /// Accept a database on a FUSE filesystem, as [`Options::allow_fuse`] (the same risks
1075
+ /// apply; default off).
1076
+ pub fn allow_fuse(mut self, yes: bool) -> Self {
1077
+ self.allow_fuse = yes;
1078
+ self
1079
+ }
1080
+
1081
+ /// The I/O backend, as [`Options::io_backend`] (default [`IoBackend::Auto`]).
1082
+ pub fn io_backend(mut self, backend: IoBackend) -> Self {
1083
+ self.io_backend = Some(backend);
1084
+ self
1085
+ }
1086
+
1087
+ /// Direct I/O for SST and blob extents, as [`Options::direct_io`] (default off).
1088
+ pub fn direct_io(mut self, yes: bool) -> Self {
1089
+ self.direct_io = Some(yes);
1090
+ self
1091
+ }
1092
+
1093
+ /// Custom filesystem (simulation).
1094
+ #[cfg(feature = "__unstable-hooks")]
1095
+ #[doc(hidden)]
1096
+ pub fn vfs(mut self, vfs: pigeonhole_io::VfsRef) -> Self {
1097
+ self.vfs = Some(vfs);
1098
+ self
1099
+ }
1100
+ }
1101
+
1102
+ /// Block-cache priority of a family.
1103
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1104
+ #[non_exhaustive]
1105
+ pub enum Priority {
1106
+ /// Evicted first.
1107
+ Low,
1108
+ /// The default.
1109
+ #[default]
1110
+ Normal,
1111
+ /// Evicted last.
1112
+ High,
1113
+ }
1114
+
1115
+ /// Compaction strategy of a family.
1116
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
1117
+ #[non_exhaustive]
1118
+ pub enum Compaction {
1119
+ /// Lowest read and space amplification (the default).
1120
+ #[default]
1121
+ Leveled,
1122
+ /// Lowest write amplification: sorted runs merge when their sizes are similar or space
1123
+ /// amplification passes 200%.
1124
+ Tiered,
1125
+ /// Drop whole files, with no rewrite, once their newest timestamp expires; for TTL'd,
1126
+ /// time-ordered data. Without a TTL nothing expires (small files still merge).
1127
+ FifoByTime,
1128
+ }
1129
+
1130
+ /// A column family's policy. Stored in the file with the family; a family's kind and
1131
+ /// options are fixed when it is created.
1132
+ ///
1133
+ /// The defaults: every version kept, no TTL, 10 bloom bits per key, LZ4 blocks of 16 KiB,
1134
+ /// values over 4 KiB separated, no merge operator, normal cache priority, leveled
1135
+ /// compaction.
1136
+ ///
1137
+ /// Counters live in a **counter family**, declared with [`Family::counter`] (decision D179,
1138
+ /// after Bigtable's aggregate families). `incr` on any other family fails with
1139
+ /// [`ErrorCode::InvalidArgument`](crate::ErrorCode::InvalidArgument).
1140
+ ///
1141
+ /// ```
1142
+ /// use pigeonhole::{days, Compression, Family, Priority};
1143
+ ///
1144
+ /// let hot = Family::default().max_versions(1).cache_priority(Priority::High);
1145
+ /// let expiring = Family::default().ttl(days(30)).compression(Compression::None);
1146
+ /// assert_ne!(hot, expiring);
1147
+ /// let hits = Family::counter();
1148
+ /// let daily = Family::counter().ttl(days(90));
1149
+ /// assert_ne!(hits, daily);
1150
+ /// ```
1151
+ #[derive(Debug, Clone, PartialEq, Eq, Default)]
1152
+ pub struct Family {
1153
+ options: FamilyOptions,
1154
+ }
1155
+
1156
+ /// How an aggregate family combines the values written to a cell, fixed when the family is
1157
+ /// created, as in Bigtable's aggregate families (decisions D179, D294, D298;
1158
+ /// [`Family::aggregate`]).
1159
+ ///
1160
+ /// Inputs are written with [`aggregate`](crate::RowMutation::aggregate) (`i64`),
1161
+ /// [`aggregate_u64`](crate::RowMutation::aggregate_u64) (the bitwise kinds) or
1162
+ /// [`aggregate_f64`](crate::RowMutation::aggregate_f64) (the `f64` kinds), and `_at` forms for
1163
+ /// a bucket. They combine within one bucket: a column at one timestamp. A bucket nothing was
1164
+ /// written to (or whose writes were all deleted) reads as absent, never as 0.
1165
+ ///
1166
+ /// Non-exhaustive: later releases add aggregations, some carrying parameters.
1167
+ #[derive(Debug, Clone, PartialEq, Eq, Hash)]
1168
+ #[non_exhaustive]
1169
+ pub enum Aggregation {
1170
+ /// The sum of the inputs, wrapping on overflow: a counter ([`Family::counter`]).
1171
+ Sum,
1172
+ /// The smallest input.
1173
+ Min,
1174
+ /// The largest input.
1175
+ Max,
1176
+ /// The distinct inputs, as a HyperLogLog sketch: read with
1177
+ /// [`CellRef::hll_estimate`](crate::CellRef::hll_estimate) (4096 registers, about 1.6%
1178
+ /// standard error). A bucket's sketch is up to 3 KiB; reads and the row cache carry it
1179
+ /// whole, so bound a wide row's buckets with a TTL or `max_versions`.
1180
+ Hll,
1181
+ /// The bitwise OR of `u64` inputs ([`aggregate_u64`](crate::RowMutation::aggregate_u64);
1182
+ /// read with [`CellRef::as_u64`](crate::CellRef::as_u64)): a set of flags.
1183
+ BitOr,
1184
+ /// The bitwise AND of `u64` inputs.
1185
+ BitAnd,
1186
+ /// The bitwise XOR of `u64` inputs.
1187
+ BitXor,
1188
+ /// The smallest `f64` input ([`aggregate_f64`](crate::RowMutation::aggregate_f64); read
1189
+ /// with [`CellRef::as_f64`](crate::CellRef::as_f64)), by `f64::total_cmp`: `-0.0` is
1190
+ /// below `+0.0`, infinities are allowed, NaN is refused.
1191
+ MinF64,
1192
+ /// The largest `f64` input, as [`Aggregation::MinF64`].
1193
+ MaxF64,
1194
+ /// The exact sum of finite `f64` inputs
1195
+ /// ([`aggregate_f64`](crate::RowMutation::aggregate_f64); read with
1196
+ /// [`CellRef::sum_f64`](crate::CellRef::sum_f64)), rounded once when read: the same
1197
+ /// inputs read the same sum in any order. A cell is a state of up to 274 bytes.
1198
+ SumF64,
1199
+ /// The count, mean and variance of finite `f64` inputs
1200
+ /// ([`aggregate_f64`](crate::RowMutation::aggregate_f64); read with
1201
+ /// [`CellRef::mean_var`](crate::CellRef::mean_var)), each computed exactly and rounded
1202
+ /// once. A cell is a state of up to 821 bytes.
1203
+ MeanVar,
1204
+ /// Counts of `f64` inputs (NaN refused) in fixed buckets between the bounds of
1205
+ /// [`HistogramParams`] ([`aggregate_f64`](crate::RowMutation::aggregate_f64); read with
1206
+ /// [`CellRef::histogram_counts`](crate::CellRef::histogram_counts)).
1207
+ Histogram(HistogramParams),
1208
+ /// A log-linear quantile sketch of finite `f64` inputs, within a relative error of
1209
+ /// 2^-p ([`QuantileParams`]; [`aggregate_f64`](crate::RowMutation::aggregate_f64); read
1210
+ /// with [`CellRef::quantile`](crate::CellRef::quantile)). The same inputs give the same
1211
+ /// sketch in any order.
1212
+ Quantiles(QuantileParams),
1213
+ /// A bloom filter of `i64` or bytes elements ([`BloomParams`];
1214
+ /// [`aggregate`](crate::RowMutation::aggregate),
1215
+ /// [`aggregate_bytes`](crate::RowMutation::aggregate_bytes); read with
1216
+ /// [`CellRef::bloom_contains`](crate::CellRef::bloom_contains)): no false negatives,
1217
+ /// false positives at the configured rate.
1218
+ Bloom(BloomParams),
1219
+ /// A set of `u32`s, stored as a standard roaring bitmap
1220
+ /// ([`set_add`](crate::RowMutation::set_add) and
1221
+ /// [`set_remove`](crate::RowMutation::set_remove), applied in commit order; read with
1222
+ /// [`CellRef::as_set`](crate::CellRef::as_set)). A cell may be large (about `N / 8`
1223
+ /// bytes for `N` elements spread densely), so above the family's `blob_threshold` it
1224
+ /// moves to a blob file, and reads and compactions fold new inputs onto it there.
1225
+ Set,
1226
+ }
1227
+
1228
+ /// A bloom family's parameters ([`Aggregation::Bloom`], D298): `bits` (a power of two,
1229
+ /// 2^6 to 2^24) and `hashes` positions per element (1 to 16). With `n` elements the
1230
+ /// false-positive rate is about `(1 − e^(−hashes·n/bits))^hashes`. A filter is stored whole
1231
+ /// in its cell: up to `bits / 8` bytes once dense.
1232
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1233
+ pub struct BloomParams {
1234
+ log2_bits: u8,
1235
+ hashes: u8,
1236
+ }
1237
+
1238
+ impl BloomParams {
1239
+ /// `bits` bits and `hashes` positions; `InvalidArgument` out of range.
1240
+ pub fn new(bits: u32, hashes: u8) -> crate::Result<Self> {
1241
+ if !bits.is_power_of_two() {
1242
+ return Err(crate::Error::new(
1243
+ crate::ErrorCode::InvalidArgument,
1244
+ "bloom bits must be a power of two, 2^6 to 2^24".to_owned(),
1245
+ ));
1246
+ }
1247
+ let p = pigeonhole_format::bloom::BloomParams {
1248
+ log2_bits: bits.trailing_zeros() as u8,
1249
+ hashes,
1250
+ };
1251
+ p.check()
1252
+ .map_err(|e| crate::Error::new(crate::ErrorCode::InvalidArgument, e.0.to_owned()))?;
1253
+ Ok(BloomParams {
1254
+ log2_bits: p.log2_bits,
1255
+ hashes,
1256
+ })
1257
+ }
1258
+
1259
+ /// The bits.
1260
+ pub fn bits(&self) -> u32 {
1261
+ 1 << self.log2_bits
1262
+ }
1263
+
1264
+ /// The positions per element.
1265
+ pub fn hashes(&self) -> u8 {
1266
+ self.hashes
1267
+ }
1268
+
1269
+ fn format(&self) -> pigeonhole_format::bloom::BloomParams {
1270
+ pigeonhole_format::bloom::BloomParams {
1271
+ log2_bits: self.log2_bits,
1272
+ hashes: self.hashes,
1273
+ }
1274
+ }
1275
+ }
1276
+
1277
+ /// A histogram family's bucket bounds ([`Aggregation::Histogram`], D298): `n` bounds
1278
+ /// `b0 < b1 < … < b(n-1)` make `n + 1` buckets, `(-∞, b0)`, `[b0, b1)`, …, `[b(n-1), +∞)`.
1279
+ #[derive(Debug, Clone, PartialEq, Eq, Hash)]
1280
+ pub struct HistogramParams {
1281
+ bounds: Vec<u64>,
1282
+ }
1283
+
1284
+ impl HistogramParams {
1285
+ /// Bounds that are finite, strictly increasing, 1 to 1023 of them, and never `-0.0`;
1286
+ /// `InvalidArgument` otherwise.
1287
+ pub fn new(bounds: impl Into<Vec<f64>>) -> crate::Result<Self> {
1288
+ let bounds: Vec<f64> = bounds.into();
1289
+ pigeonhole_format::buckets::histogram_bounds(
1290
+ &pigeonhole_format::buckets::histogram_params(&bounds),
1291
+ )
1292
+ .map_err(|e| crate::Error::new(crate::ErrorCode::InvalidArgument, e.0.to_owned()))?;
1293
+ Ok(HistogramParams {
1294
+ bounds: bounds.iter().map(|b| b.to_bits()).collect(),
1295
+ })
1296
+ }
1297
+
1298
+ /// The bounds.
1299
+ pub fn bounds(&self) -> Vec<f64> {
1300
+ self.bounds.iter().map(|&b| f64::from_bits(b)).collect()
1301
+ }
1302
+
1303
+ /// The bucket an input `x` falls in: how many bounds lie at or below it (IEEE `<=`, so
1304
+ /// `-0.0` and `0.0` share a bucket). Counts from
1305
+ /// [`CellRef::histogram_counts`](crate::CellRef::histogram_counts) are indexed the same
1306
+ /// way: `n` bounds give `n + 1` counts.
1307
+ pub fn bucket_of(&self, x: f64) -> usize {
1308
+ pigeonhole_format::buckets::bucket_of(&self.bounds(), x)
1309
+ }
1310
+ }
1311
+
1312
+ /// A quantile family's parameters ([`Aggregation::Quantiles`], D298): the mantissa bits
1313
+ /// `p` an input keeps (1 to 12; a relative error of at most 2^-p; 7 by default) and the
1314
+ /// buckets each sign's store keeps (16 to 4096; 2048 by default) before its smallest
1315
+ /// magnitudes collapse into one bucket. Out-of-range values are refused when the family is
1316
+ /// created.
1317
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1318
+ pub struct QuantileParams {
1319
+ mantissa_bits: u8,
1320
+ max_buckets: u16,
1321
+ }
1322
+
1323
+ impl Default for QuantileParams {
1324
+ fn default() -> Self {
1325
+ let d = pigeonhole_format::buckets::QuantileParams::default();
1326
+ QuantileParams {
1327
+ mantissa_bits: d.mantissa_bits,
1328
+ max_buckets: d.max_buckets,
1329
+ }
1330
+ }
1331
+ }
1332
+
1333
+ impl QuantileParams {
1334
+ /// With `p` mantissa bits.
1335
+ pub fn mantissa_bits(mut self, p: u8) -> Self {
1336
+ self.mantissa_bits = p;
1337
+ self
1338
+ }
1339
+
1340
+ /// With `n` buckets per store.
1341
+ pub fn max_buckets(mut self, n: u16) -> Self {
1342
+ self.max_buckets = n;
1343
+ self
1344
+ }
1345
+
1346
+ /// The mantissa bits.
1347
+ pub fn get_mantissa_bits(&self) -> u8 {
1348
+ self.mantissa_bits
1349
+ }
1350
+
1351
+ /// The buckets per store.
1352
+ pub fn get_max_buckets(&self) -> u16 {
1353
+ self.max_buckets
1354
+ }
1355
+
1356
+ fn format(&self) -> pigeonhole_format::buckets::QuantileParams {
1357
+ pigeonhole_format::buckets::QuantileParams {
1358
+ mantissa_bits: self.mantissa_bits,
1359
+ max_buckets: self.max_buckets,
1360
+ }
1361
+ }
1362
+ }
1363
+
1364
+ impl Aggregation {
1365
+ fn kind(&self) -> FamilyKind {
1366
+ match self {
1367
+ Aggregation::Sum => FamilyKind::Counter,
1368
+ Aggregation::Min => FamilyKind::Min,
1369
+ Aggregation::Max => FamilyKind::Max,
1370
+ Aggregation::Hll => FamilyKind::Hll,
1371
+ Aggregation::BitOr => FamilyKind::BitOr,
1372
+ Aggregation::BitAnd => FamilyKind::BitAnd,
1373
+ Aggregation::BitXor => FamilyKind::BitXor,
1374
+ Aggregation::MinF64 => FamilyKind::MinF64,
1375
+ Aggregation::MaxF64 => FamilyKind::MaxF64,
1376
+ Aggregation::SumF64 => FamilyKind::SumF64,
1377
+ Aggregation::MeanVar => FamilyKind::MeanVar,
1378
+ Aggregation::Histogram(_) => FamilyKind::Histogram,
1379
+ Aggregation::Quantiles(_) => FamilyKind::Quantiles,
1380
+ Aggregation::Bloom(_) => FamilyKind::Bloom,
1381
+ Aggregation::Set => FamilyKind::Set,
1382
+ }
1383
+ }
1384
+
1385
+ /// The family's `kind_params` (D298): a histogram's bounds, a quantile sketch's
1386
+ /// parameters; none for the other aggregations.
1387
+ fn kind_params(&self) -> Vec<u8> {
1388
+ match self {
1389
+ Aggregation::Histogram(h) => pigeonhole_format::buckets::histogram_params(&h.bounds()),
1390
+ Aggregation::Quantiles(q) => q.format().encode(),
1391
+ Aggregation::Bloom(b) => b.format().encode(),
1392
+ _ => Vec::new(),
1393
+ }
1394
+ }
1395
+
1396
+ /// The aggregation of an engine family's options (`None` for a standard family), its
1397
+ /// parameters read back from `kind_params`.
1398
+ pub(crate) fn of_options(o: &pigeonhole_format::manifest::FamilyOptions) -> Option<Self> {
1399
+ use pigeonhole_format::buckets;
1400
+ match o.kind {
1401
+ FamilyKind::Histogram => buckets::histogram_bounds(&o.kind_params).ok().map(|b| {
1402
+ Aggregation::Histogram(HistogramParams {
1403
+ bounds: b.iter().map(|x| x.to_bits()).collect(),
1404
+ })
1405
+ }),
1406
+ FamilyKind::Quantiles => buckets::QuantileParams::parse(&o.kind_params)
1407
+ .ok()
1408
+ .map(|q| {
1409
+ Aggregation::Quantiles(QuantileParams {
1410
+ mantissa_bits: q.mantissa_bits,
1411
+ max_buckets: q.max_buckets,
1412
+ })
1413
+ }),
1414
+ FamilyKind::Bloom => pigeonhole_format::bloom::BloomParams::parse(&o.kind_params)
1415
+ .ok()
1416
+ .map(|b| {
1417
+ Aggregation::Bloom(BloomParams {
1418
+ log2_bits: b.log2_bits,
1419
+ hashes: b.hashes,
1420
+ })
1421
+ }),
1422
+ kind => Self::of_kind(kind),
1423
+ }
1424
+ }
1425
+
1426
+ /// The aggregation of an engine family kind without parameters (`None` for a standard
1427
+ /// or vector family).
1428
+ fn of_kind(kind: FamilyKind) -> Option<Self> {
1429
+ match kind {
1430
+ FamilyKind::Standard | FamilyKind::Vector => None,
1431
+ FamilyKind::Counter => Some(Aggregation::Sum),
1432
+ FamilyKind::Min => Some(Aggregation::Min),
1433
+ FamilyKind::Max => Some(Aggregation::Max),
1434
+ FamilyKind::Hll => Some(Aggregation::Hll),
1435
+ FamilyKind::BitOr => Some(Aggregation::BitOr),
1436
+ FamilyKind::BitAnd => Some(Aggregation::BitAnd),
1437
+ FamilyKind::BitXor => Some(Aggregation::BitXor),
1438
+ FamilyKind::MinF64 => Some(Aggregation::MinF64),
1439
+ FamilyKind::MaxF64 => Some(Aggregation::MaxF64),
1440
+ FamilyKind::SumF64 => Some(Aggregation::SumF64),
1441
+ FamilyKind::MeanVar => Some(Aggregation::MeanVar),
1442
+ FamilyKind::Set => Some(Aggregation::Set),
1443
+ FamilyKind::Histogram | FamilyKind::Quantiles | FamilyKind::Bloom => None,
1444
+ }
1445
+ }
1446
+
1447
+ fn operator(&self) -> &'static str {
1448
+ match self {
1449
+ Aggregation::Sum => I64_ADD,
1450
+ Aggregation::Min => I64_MIN,
1451
+ Aggregation::Max => I64_MAX,
1452
+ Aggregation::Hll => HLL,
1453
+ Aggregation::BitOr => "pigeonhole.u64_or",
1454
+ Aggregation::BitAnd => "pigeonhole.u64_and",
1455
+ Aggregation::BitXor => "pigeonhole.u64_xor",
1456
+ Aggregation::MinF64 => "pigeonhole.f64_min",
1457
+ Aggregation::MaxF64 => "pigeonhole.f64_max",
1458
+ Aggregation::SumF64 => "pigeonhole.f64_sum",
1459
+ Aggregation::MeanVar => "pigeonhole.f64_mean_var",
1460
+ Aggregation::Histogram(_) => "pigeonhole.f64_histogram",
1461
+ Aggregation::Quantiles(_) => "pigeonhole.f64_quantiles",
1462
+ Aggregation::Bloom(_) => "pigeonhole.bloom",
1463
+ Aggregation::Set => "pigeonhole.set",
1464
+ }
1465
+ }
1466
+ }
1467
+
1468
+ impl Family {
1469
+ /// An aggregate family: every cell combines the `i64` inputs written to it with
1470
+ /// `aggregation` (decision D294). It works as a [counter](Family::counter) does, which
1471
+ /// is the `Sum` case: [`aggregate`](crate::RowMutation::aggregate) writes an input to
1472
+ /// the column's cell at one fixed timestamp, [`aggregate_at`] to a bucket at a
1473
+ /// timestamp you choose, and inputs combine when read and when compacted.
1474
+ ///
1475
+ /// - [`put_i64`](crate::RowMutation::put_i64) sets the cell (`put_i64_at` a bucket):
1476
+ /// later inputs combine with the value it set. Other puts, and
1477
+ /// [`incr`](crate::RowMutation::incr) outside a `Sum` family, are refused with
1478
+ /// `InvalidArgument`.
1479
+ /// - An `Hll` family counts distinct inputs: its cells are sketches, read with
1480
+ /// [`CellRef::hll_estimate`](crate::CellRef::hll_estimate). `put_i64` is refused there;
1481
+ /// `put` sets a bucket only to a well-formed sketch (as `phdb load` writes one back).
1482
+ /// - A delete removes what earlier commits wrote, so the next input starts the cell
1483
+ /// again: after `delete_column`, a `Min` cell holds the smallest input written since.
1484
+ /// A bucket with no input reads as absent.
1485
+ /// - TTL and `max_versions` work as for counters.
1486
+ ///
1487
+ /// A family of an aggregation added after 1.0 (`Min`, `Max`, `Hll`) marks the file: from its
1488
+ /// creation on, pigeonhole 1.0.x refuses to open the file (`UnsupportedFeature`), even
1489
+ /// after the family is dropped.
1490
+ ///
1491
+ /// ```
1492
+ /// use pigeonhole::{Aggregation, Family, Options, Pigeonhole};
1493
+ ///
1494
+ /// # fn main() -> pigeonhole::Result<()> {
1495
+ /// # let dir = pigeonhole::doc_support::temp_dir();
1496
+ /// let db = Pigeonhole::open(dir.join("app.phdb"), Options::default())?;
1497
+ /// let t = db
1498
+ /// .table("sensors")?
1499
+ /// .family("low", Family::aggregate(Aggregation::Min))
1500
+ /// .family("high", Family::aggregate(Aggregation::Max))
1501
+ /// .create_if_missing()?;
1502
+ /// for reading in [21, 17, 25] {
1503
+ /// t.mutate(b"s1")
1504
+ /// .aggregate("low", b"temp", reading)
1505
+ /// .aggregate("high", b"temp", reading)
1506
+ /// .commit()?;
1507
+ /// }
1508
+ /// assert_eq!(t.get(b"s1", "low", b"temp")?.unwrap().as_i64(), Some(17));
1509
+ /// assert_eq!(t.get(b"s1", "high", b"temp")?.unwrap().as_i64(), Some(25));
1510
+ /// assert!(t.get(b"s2", "low", b"temp")?.is_none()); // no input: absent, not 0
1511
+ /// # db.close()?;
1512
+ /// # Ok(())
1513
+ /// # }
1514
+ /// ```
1515
+ ///
1516
+ /// [`aggregate_at`]: crate::RowMutation::aggregate_at
1517
+ pub fn aggregate(aggregation: Aggregation) -> Self {
1518
+ Self {
1519
+ options: FamilyOptions::default()
1520
+ .merge_operator(aggregation.operator().to_owned())
1521
+ .kind(aggregation.kind())
1522
+ .kind_params(aggregation.kind_params()),
1523
+ }
1524
+ }
1525
+
1526
+ /// A vector family (D303): every value is a vector of `spec`'s element type and
1527
+ /// dimension, ranked by its metric. See [`VectorSpec`](crate::VectorSpec) for the writes
1528
+ /// it takes and what it refuses.
1529
+ pub fn vector(spec: crate::VectorSpec) -> Self {
1530
+ Self {
1531
+ options: FamilyOptions::default()
1532
+ .kind(FamilyKind::Vector)
1533
+ .kind_params(spec.kind_params()),
1534
+ }
1535
+ }
1536
+
1537
+ /// A counter family: every cell is an `i64` sum (decision D179).
1538
+ ///
1539
+ /// - [`incr`](crate::RowMutation::incr) adds to the column's counter, which lives at
1540
+ /// one fixed timestamp (0), so a counter is one cell however often it is incremented:
1541
+ /// its increments combine when read and when compacted.
1542
+ /// - [`incr_at`](crate::RowMutation::incr_at) adds to a *bucket*: the version at a
1543
+ /// timestamp you choose (an hour or a day, say). Each bucket is its own version. The
1544
+ /// TTL expires each bucket; `max_versions` limits what reads return, but compaction
1545
+ /// keeps older buckets (a later delete of a newer one shows them again), so bound
1546
+ /// storage with a TTL.
1547
+ /// - [`put_i64`](crate::RowMutation::put_i64) sets the counter (`put_i64_at` a bucket);
1548
+ /// later increments add to it. Other puts are refused with `InvalidArgument`.
1549
+ /// - A delete removes what earlier commits wrote: an `incr` after `delete_column`
1550
+ /// starts the counter again from 0. A write in the same commit as the delete is not
1551
+ /// hidden (`incr` then `delete_column` in one mutation leaves the increment). A
1552
+ /// delete without a timestamp takes the commit timestamp, so a bucket at a later
1553
+ /// timestamp survives it.
1554
+ ///
1555
+ /// With a TTL the fixed timestamp would expire at once, so such a family takes only
1556
+ /// buckets (`incr_at`, `put_i64_at`); `incr` and `put_i64` fail with `InvalidArgument`.
1557
+ ///
1558
+ /// ```
1559
+ /// use pigeonhole::{Family, Options, Pigeonhole};
1560
+ ///
1561
+ /// # fn main() -> pigeonhole::Result<()> {
1562
+ /// # let dir = pigeonhole::doc_support::temp_dir();
1563
+ /// let db = Pigeonhole::open(dir.join("app.phdb"), Options::default())?;
1564
+ /// let t = db.table("pages")?.family("hits", Family::counter()).create_if_missing()?;
1565
+ /// t.mutate(b"home").incr("hits", b"total", 2).commit()?;
1566
+ /// t.mutate(b"home").incr("hits", b"total", 3).commit()?;
1567
+ /// assert_eq!(t.get(b"home", "hits", b"total")?.unwrap().as_i64(), Some(5));
1568
+ ///
1569
+ /// // Hourly buckets: one version per hour.
1570
+ /// let hour = 3_600_000_000; // microseconds
1571
+ /// t.mutate(b"home").incr_at("hits", b"hourly", 7 * hour, 1).commit()?;
1572
+ /// t.mutate(b"home").incr_at("hits", b"hourly", 8 * hour, 4).commit()?;
1573
+ /// t.mutate(b"home").incr_at("hits", b"hourly", 8 * hour, 1).commit()?;
1574
+ /// let row = t.row(b"home").qualifier_prefix(b"hourly").versions(0).read()?.unwrap();
1575
+ /// let hourly: Vec<_> = row
1576
+ /// .iter()
1577
+ /// .map(|e| (e.cell.timestamp(), e.cell.as_i64().unwrap()))
1578
+ /// .collect();
1579
+ /// assert_eq!(hourly, [(8 * hour, 5), (7 * hour, 1)]);
1580
+ /// # db.close()?;
1581
+ /// # Ok(())
1582
+ /// # }
1583
+ /// ```
1584
+ pub fn counter() -> Self {
1585
+ Self::aggregate(Aggregation::Sum)
1586
+ }
1587
+
1588
+ /// Keep at most `n` versions per column (0 keeps all).
1589
+ pub fn max_versions(mut self, n: u32) -> Self {
1590
+ self.options.max_versions = n;
1591
+ self
1592
+ }
1593
+
1594
+ /// Cells older than `ttl` (by timestamp) expire.
1595
+ pub fn ttl(mut self, ttl: Duration) -> Self {
1596
+ self.options.ttl_micros = u64::try_from(ttl.as_micros()).unwrap_or(u64::MAX);
1597
+ self
1598
+ }
1599
+
1600
+ /// Bloom filter bits per key (0 disables filters; default 10).
1601
+ pub fn bloom_bits(mut self, bits: u8) -> Self {
1602
+ self.options.bloom_bits = bits;
1603
+ self
1604
+ }
1605
+
1606
+ /// Store values longer than `bytes` in blob files (default 4096; `u32::MAX` never). A
1607
+ /// flush or compaction moves such a value out of the family's tree, which keeps a 16-byte
1608
+ /// pointer, so compactions and scans of other columns do not copy it. Blob GC rewrites
1609
+ /// blob files once they are half garbage.
1610
+ pub fn blob_threshold(mut self, bytes: u32) -> Self {
1611
+ self.options.blob_threshold = bytes;
1612
+ self
1613
+ }
1614
+
1615
+ /// Block compression (ICR 0086; default [`Compression::Lz4`](crate::Compression::Lz4)):
1616
+ /// - [`Compression::Lz4`](crate::Compression::Lz4): fast, the default;
1617
+ /// - [`Compression::Zstd(level)`](crate::Compression::Zstd): smaller files than LZ4 for most
1618
+ /// data, at a higher CPU cost to write and read, at a libzstd level (1 to 22, higher is
1619
+ /// smaller and slower to write; negative levels are faster; 0 means 3);
1620
+ /// - [`Compression::None`](crate::Compression::None): stored as is (hot, small families).
1621
+ ///
1622
+ /// ```
1623
+ /// use pigeonhole::{Compression, Family};
1624
+ ///
1625
+ /// let archive = Family::default().compression(Compression::Zstd(9));
1626
+ /// # let _ = archive;
1627
+ /// ```
1628
+ pub fn compression(mut self, compression: crate::Compression) -> Self {
1629
+ match compression {
1630
+ crate::Compression::None => self.options.compression = Compression::None,
1631
+ crate::Compression::Lz4 => self.options.compression = Compression::Lz4,
1632
+ crate::Compression::Zstd(level) => {
1633
+ self.options.compression = Compression::Zstd;
1634
+ self.options.compression_level = level;
1635
+ }
1636
+ }
1637
+ self
1638
+ }
1639
+
1640
+ /// Target uncompressed data-block size in bytes (default 16 KiB).
1641
+ pub fn block_size(mut self, bytes: u32) -> Self {
1642
+ self.options.block_size = bytes;
1643
+ self
1644
+ }
1645
+
1646
+ /// Merge operator for this family, by registered name (see
1647
+ /// [`Options::merge_operator`]): [`RowMutation::merge`](crate::RowMutation::merge)
1648
+ /// writes its operands. Counters need none: declare a [`Family::counter`]. A counter
1649
+ /// family sums with the built-in `pigeonhole.i64_add` and refuses any other name at
1650
+ /// creation.
1651
+ ///
1652
+ /// A family that names `pigeonhole.i64_add` without being a counter family is how
1653
+ /// families created by 0.1.0 read: `incr` there writes at the commit timestamp and
1654
+ /// runs of increments fold across timestamps (decision D41). New counters belong in a
1655
+ /// counter family; see the migration note in the changelog.
1656
+ pub fn merge_operator(mut self, name: &str) -> Self {
1657
+ name.clone_into(&mut self.options.merge_operator);
1658
+ self
1659
+ }
1660
+
1661
+ /// Block-cache priority.
1662
+ pub fn cache_priority(mut self, priority: Priority) -> Self {
1663
+ self.options.cache_priority = match priority {
1664
+ Priority::Low => CachePriority::Low,
1665
+ Priority::Normal => CachePriority::Normal,
1666
+ Priority::High => CachePriority::High,
1667
+ };
1668
+ self
1669
+ }
1670
+
1671
+ /// Compaction strategy (default `Leveled`).
1672
+ pub fn compaction(mut self, strategy: Compaction) -> Self {
1673
+ self.options.compaction = match strategy {
1674
+ Compaction::Leveled => CompactionStyle::Leveled,
1675
+ Compaction::Tiered => CompactionStyle::Tiered,
1676
+ Compaction::FifoByTime => CompactionStyle::FifoByTime,
1677
+ };
1678
+ self
1679
+ }
1680
+ }
1681
+
1682
+ impl Options {
1683
+ /// The engine configuration these options describe.
1684
+ pub(crate) fn to_engine(&self) -> Result<EngineOptions, pigeonhole_engine::Error> {
1685
+ self.to_engine_for(false)
1686
+ }
1687
+
1688
+ /// [`Options::auto_recover`].
1689
+ pub(crate) fn recovery(&self) -> Recovery {
1690
+ self.auto_recover
1691
+ }
1692
+
1693
+ /// [`Options::write_stall_timeout`], or the engine's default.
1694
+ pub(crate) fn stall_timeout(&self) -> Duration {
1695
+ self.write_stall_timeout
1696
+ .unwrap_or_else(|| Duration::from_secs(30))
1697
+ }
1698
+
1699
+ /// The engine configuration these options describe, for an application-owned open when
1700
+ /// `application_owned` (an io_uring backend then starts no reaper thread, #408).
1701
+ pub(crate) fn to_engine_for(
1702
+ &self,
1703
+ application_owned: bool,
1704
+ ) -> Result<EngineOptions, pigeonhole_engine::Error> {
1705
+ let vfs = match &self.vfs {
1706
+ Some(v) => Arc::clone(v),
1707
+ None => backend_vfs(self.io_backend, application_owned)?,
1708
+ };
1709
+ if let Some(on) = self.nowait_reads {
1710
+ vfs.set_nowait_reads(on);
1711
+ }
1712
+ let direct_io = self.direct_io.unwrap_or_else(env_direct_io);
1713
+ let mut o = EngineOptions::new(vfs);
1714
+ o.direct_io = direct_io;
1715
+ o.create_if_missing = self.create_if_missing;
1716
+ o.shards = self.shards;
1717
+ // D289's budget, from the physical cores within the affinity mask and CPU quota.
1718
+ let budget = thread_budget(
1719
+ pigeonhole_io::sys::default_shards(),
1720
+ self.cpu_profile,
1721
+ (self.shards != 0).then_some(self.shards),
1722
+ self.shard_threads,
1723
+ self.compaction_cores,
1724
+ );
1725
+ o.compaction_threads = match self.compaction_cores {
1726
+ Some(k) => k,
1727
+ // Application-owned mode starts no threads (D40).
1728
+ None if application_owned => 0,
1729
+ None => budget.compaction,
1730
+ };
1731
+ o.pin_threads = self.pin_threads;
1732
+ o.shard_threads = budget.drivers;
1733
+ // The load controller (D289 PR 2), on by default since #1015's tuning (the owner,
1734
+ // 2026-10-28), never with a fixed count; application-owned shards run on the
1735
+ // application's threads (D40).
1736
+ o.adaptive_drivers = self.adaptive_shard_threads && !budget.fixed && !application_owned;
1737
+ if application_owned {
1738
+ o.background_workers = self.background_workers;
1739
+ }
1740
+ o.durability = self.durability.engine();
1741
+ o.memtable_budget = self.memtable_budget;
1742
+ o.memtable_freeze_bytes = self.memtable_budget / 4;
1743
+ if let Some(bytes) = self.block_cache {
1744
+ o.block_cache_bytes = bytes;
1745
+ }
1746
+ o.row_cache_bytes = self.row_cache;
1747
+ if let Some(bytes) = self.row_cache_max_row {
1748
+ o.row_cache_max_row = bytes;
1749
+ }
1750
+ if let Some(on) = self.row_cache_get_fill {
1751
+ o.row_cache_get_fill = on;
1752
+ }
1753
+ if let Some(steps) = self.counter_checkpoint_steps {
1754
+ o.counter_checkpoint_steps = steps;
1755
+ }
1756
+ o.row_cache_families = self.row_cache_families.clone();
1757
+ o.shm_dir.clone_from(&self.shm_dir);
1758
+ o.reader_slots = self.reader_slots;
1759
+ o.read_only_fallback = self.read_only_fallback;
1760
+ o.read_only = self.read_only;
1761
+ o.allow_fuse = self.allow_fuse;
1762
+ if let Some(bytes) = self.wal_segment_size {
1763
+ o.wal.segment_size = bytes;
1764
+ }
1765
+ o.feed = match (self.change_feed, &self.feed_tables) {
1766
+ (Some(r), tables) => {
1767
+ let mut f = pigeonhole_engine::FeedOptions::default();
1768
+ f.retention_bytes = r.bytes;
1769
+ f.max_age_micros = r
1770
+ .age
1771
+ .map(|a| u64::try_from(a.as_micros()).unwrap_or(u64::MAX));
1772
+ f.tables.clone_from(tables);
1773
+ f.sync_interval_micros = r
1774
+ .sync_interval
1775
+ .map(|d| u64::try_from(d.as_micros()).unwrap_or(u64::MAX));
1776
+ Some(f)
1777
+ }
1778
+ (None, Some(_)) => {
1779
+ return Err(pigeonhole_engine::Error::InvalidArgument(
1780
+ "feed_tables needs the change feed on (Options::change_feed)".into(),
1781
+ ));
1782
+ }
1783
+ (None, None) => None,
1784
+ };
1785
+ // Unset (neither `change_feed` nor `change_feed_off`): inherit the last session's.
1786
+ o.feed_inherit = self.change_feed.is_none() && !self.feed_off;
1787
+ o.tablet_changes = self.tablet_changes;
1788
+ o.balance_pack = self.tablet_packing;
1789
+ if let Some(window) = self.commit_spin {
1790
+ o.commit_spin_nanos = u64::try_from(window.as_nanos()).unwrap_or(u64::MAX);
1791
+ }
1792
+ // An explicit window wins over the profile's (D198, amended 2026-10-30).
1793
+ if let Some(window) = self.shard_spin.or(shard_spin_default(self.cpu_profile)) {
1794
+ o.shard_spin_nanos = u64::try_from(window.as_nanos()).unwrap_or(u64::MAX);
1795
+ }
1796
+ // An explicit window is fixed unless a cap is set with it; otherwise the profile's
1797
+ // cap applies (#1176).
1798
+ let cap = match (self.shard_spin_cap, self.shard_spin) {
1799
+ (Some(cap), _) => Some(cap),
1800
+ (None, Some(_)) => None,
1801
+ (None, None) => shard_spin_cap_default(self.cpu_profile),
1802
+ };
1803
+ if let Some(cap) = cap {
1804
+ o.shard_spin_cap_nanos = u64::try_from(cap.as_nanos()).unwrap_or(u64::MAX);
1805
+ }
1806
+ if let Some(timeout) = self.write_stall_timeout {
1807
+ o.write_stall_timeout_nanos = u64::try_from(timeout.as_nanos()).unwrap_or(u64::MAX);
1808
+ }
1809
+ if let Some((interval, min_writes, split_bytes)) = self.tablet_balance {
1810
+ o.balance_interval_nanos = u64::try_from(interval.as_nanos()).unwrap_or(u64::MAX);
1811
+ o.balance_min_writes = min_writes;
1812
+ o.tablet_split_bytes = split_bytes;
1813
+ }
1814
+ for op in &self.merge_operators {
1815
+ o.merge_operators
1816
+ .register(Arc::new(crate::merge::EngineMergeOperator(Arc::clone(op))));
1817
+ }
1818
+ Ok(o)
1819
+ }
1820
+ }
1821
+
1822
+ impl ReaderOptions {
1823
+ /// The engine configuration these options describe.
1824
+ pub(crate) fn to_engine(&self) -> Result<EngineOptions, pigeonhole_engine::Error> {
1825
+ let vfs = match &self.vfs {
1826
+ Some(v) => Arc::clone(v),
1827
+ None => backend_vfs(self.io_backend, false)?,
1828
+ };
1829
+ let direct_io = self.direct_io.unwrap_or_else(env_direct_io);
1830
+ let mut o = EngineOptions::new(vfs);
1831
+ o.direct_io = direct_io;
1832
+ if let Some(bytes) = self.block_cache {
1833
+ o.block_cache_bytes = bytes;
1834
+ }
1835
+ o.shm_dir.clone_from(&self.shm_dir);
1836
+ o.allow_fuse = self.allow_fuse;
1837
+ o.row_cache_bytes = self.row_cache.unwrap_or(DEFAULT_ROW_CACHE);
1838
+ if let Some(bytes) = self.row_cache_max_row {
1839
+ o.row_cache_max_row = bytes;
1840
+ }
1841
+ o.row_cache_families.clone_from(&self.row_cache_families);
1842
+ for op in &self.merge_operators {
1843
+ o.merge_operators
1844
+ .register(Arc::new(crate::merge::EngineMergeOperator(Arc::clone(op))));
1845
+ }
1846
+ Ok(o)
1847
+ }
1848
+ }
1849
+
1850
+ impl Family {
1851
+ /// The persisted options.
1852
+ pub(crate) fn to_engine(&self) -> FamilyOptions {
1853
+ self.options.clone()
1854
+ }
1855
+
1856
+ /// The builder for options read back from the catalog (ICR 0047).
1857
+ pub(crate) fn from_engine(options: FamilyOptions) -> Self {
1858
+ Self { options }
1859
+ }
1860
+ }
1861
+
1862
+ /// Which I/O backend a database runs its file I/O on.
1863
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
1864
+ #[non_exhaustive]
1865
+ pub enum IoBackend {
1866
+ /// A pool of threads serving submitted I/O with `pread` and `pwrite`, on every platform.
1867
+ Pread,
1868
+ /// io_uring (Linux): submitted I/O goes through a ring instead of a thread pool. Opening
1869
+ /// fails where it is unavailable.
1870
+ Uring,
1871
+ /// io_uring where it is available, `pread` otherwise (the default, D218).
1872
+ #[default]
1873
+ Auto,
1874
+ }
1875
+
1876
+ /// A database's io_uring rings now ([`Pigeonhole::io_rings`](crate::Pigeonhole::io_rings)).
1877
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
1878
+ #[non_exhaustive]
1879
+ pub struct IoRings {
1880
+ /// Rings: the shared one, plus one per shard thread and compaction thread that got its
1881
+ /// own.
1882
+ pub rings: usize,
1883
+ /// Times a thread could not get a ring of its own (the kernel refused one, `ENOMEM` or a
1884
+ /// missing feature), counted per attempt; the thread retries later (#929, ICR 0070).
1885
+ pub attach_failures: u64,
1886
+ /// I/O completed synchronously on the calling thread instead of through a ring: in
1887
+ /// application-owned mode, a thread with no ring of its own runs its I/O inline, as the
1888
+ /// pread backend does (#929, ICR 0070, ICR 0087). Nonzero: some I/O blocked a thread
1889
+ /// your event loop drives.
1890
+ pub inline: u64,
1891
+ }
1892
+
1893
+ /// The backend `backend` names; unset, [`IoBackend::Auto`] (D218), or with the
1894
+ /// `__unstable-hooks` feature the one `PIGEONHOLE_IO` names (a test variable: `pread`, `uring`
1895
+ /// or `auto`). For an application-owned open, an io_uring backend without a reaper thread.
1896
+ fn backend_vfs(
1897
+ backend: Option<IoBackend>,
1898
+ application_owned: bool,
1899
+ ) -> Result<VfsRef, pigeonhole_engine::Error> {
1900
+ let backend = backend.unwrap_or_else(env_io_backend);
1901
+ let pread = || -> VfsRef { pigeonhole_io::pread::PreadVfs::new(0) };
1902
+ match backend {
1903
+ IoBackend::Pread => Ok(pread()),
1904
+ IoBackend::Uring => uring_vfs(application_owned).ok_or(
1905
+ pigeonhole_engine::Error::Unsupported("io_uring is unavailable on this system"),
1906
+ ),
1907
+ IoBackend::Auto => Ok(uring_vfs(application_owned).unwrap_or_else(pread)),
1908
+ }
1909
+ }
1910
+
1911
+ /// The backend `PIGEONHOLE_IO` names (a test variable, read only with the
1912
+ /// `__unstable-hooks` feature), else [`IoBackend::Auto`].
1913
+ fn env_io_backend() -> IoBackend {
1914
+ #[cfg(feature = "__unstable-hooks")]
1915
+ match std::env::var("PIGEONHOLE_IO").as_deref() {
1916
+ Ok("pread") => return IoBackend::Pread,
1917
+ Ok("uring") => return IoBackend::Uring,
1918
+ _ => {}
1919
+ }
1920
+ IoBackend::Auto
1921
+ }
1922
+
1923
+ /// `PIGEONHOLE_DIRECT=1` (a test variable, read only with the `__unstable-hooks` feature)
1924
+ /// turns direct I/O on where the options leave it unset.
1925
+ fn env_direct_io() -> bool {
1926
+ cfg!(feature = "__unstable-hooks") && std::env::var("PIGEONHOLE_DIRECT").as_deref() == Ok("1")
1927
+ }
1928
+
1929
+ /// An io_uring backend, if the kernel offers one.
1930
+ #[cfg(target_os = "linux")]
1931
+ fn uring_vfs(application_owned: bool) -> Option<VfsRef> {
1932
+ let vfs = if application_owned {
1933
+ pigeonhole_io::uring::UringVfs::new_application_owned()
1934
+ } else {
1935
+ pigeonhole_io::uring::UringVfs::new()
1936
+ };
1937
+ vfs.ok().map(|v| v as VfsRef)
1938
+ }
1939
+
1940
+ #[cfg(not(target_os = "linux"))]
1941
+ fn uring_vfs(_application_owned: bool) -> Option<VfsRef> {
1942
+ None
1943
+ }
1944
+
1945
+ #[cfg(test)]
1946
+ mod tests {
1947
+ use super::{CpuProfile, ThreadBudget, thread_budget};
1948
+
1949
+ fn b(shards: usize, drivers: usize, fixed: bool, compaction: usize) -> ThreadBudget {
1950
+ ThreadBudget {
1951
+ shards,
1952
+ drivers,
1953
+ fixed,
1954
+ compaction,
1955
+ }
1956
+ }
1957
+
1958
+ /// D289's load controller is on by default (the owner, 2026-10-28, after #1015's box
1959
+ /// rounds), off with `adaptive_shard_threads(false)`, and never with a fixed
1960
+ /// `shard_threads` or in application-owned mode (D40).
1961
+ #[test]
1962
+ fn the_load_controller_is_on_by_default() {
1963
+ use super::Options;
1964
+ let o = || Options::default().vfs(pigeonhole_io::sim::SimVfs::new(1));
1965
+ let adaptive = |o: Options, app: bool| o.to_engine_for(app).unwrap().adaptive_drivers;
1966
+ assert!(adaptive(o(), false));
1967
+ assert!(!adaptive(o().adaptive_shard_threads(false), false));
1968
+ assert!(adaptive(o().adaptive_shard_threads(true), false));
1969
+ assert!(!adaptive(
1970
+ o().adaptive_shard_threads(true).shard_threads(4),
1971
+ false
1972
+ ));
1973
+ assert!(!adaptive(o(), true));
1974
+ // The engine-owned default starts a thread per shard: the controller's ceiling.
1975
+ let e = o().shards(20).to_engine_for(false).unwrap();
1976
+ assert_eq!(e.shard_threads, 20);
1977
+ }
1978
+
1979
+ /// The shard's spin window by profile (D198, amended 2026-10-30; #1176): `Embedded`
1980
+ /// polls 200 µs adaptive up to 1 ms, `Server` a fixed 1 ms, and an explicit window wins
1981
+ /// over either.
1982
+ #[test]
1983
+ fn the_shard_spin_follows_the_profile() {
1984
+ use super::Options;
1985
+ let o = || Options::default().vfs(pigeonhole_io::sim::SimVfs::new(1));
1986
+ let spin = |o: Options| {
1987
+ let e = o.to_engine_for(false).unwrap();
1988
+ (e.shard_spin_nanos, e.shard_spin_cap_nanos)
1989
+ };
1990
+ // `Embedded`: 200 µs, adaptive up to 1 ms (#1176); `Server`: a fixed 1 ms.
1991
+ assert_eq!(spin(o()), (200_000, 1_000_000));
1992
+ assert_eq!(
1993
+ spin(o().cpu_profile(CpuProfile::Embedded)),
1994
+ (200_000, 1_000_000)
1995
+ );
1996
+ assert_eq!(spin(o().cpu_profile(CpuProfile::Server)), (1_000_000, 0));
1997
+ #[cfg(feature = "__unstable-hooks")]
1998
+ {
1999
+ use std::time::Duration;
2000
+ let set = Duration::from_micros(300);
2001
+ // An explicit window is fixed, under either profile, unless a cap comes with it.
2002
+ assert_eq!(
2003
+ spin(o().cpu_profile(CpuProfile::Server).shard_spin(set)),
2004
+ (300_000, 0)
2005
+ );
2006
+ assert_eq!(spin(o().shard_spin(set)), (300_000, 0));
2007
+ assert_eq!(spin(o().shard_spin(Duration::ZERO)), (0, 0));
2008
+ assert_eq!(
2009
+ spin(o().shard_spin(set).shard_spin_cap(Duration::from_millis(2))),
2010
+ (300_000, 2_000_000)
2011
+ );
2012
+ // A cap alone keeps the profile's window.
2013
+ assert_eq!(
2014
+ spin(o().shard_spin_cap(Duration::from_micros(200))),
2015
+ (200_000, 200_000)
2016
+ );
2017
+ }
2018
+ }
2019
+
2020
+ /// D289's tables (the decision's entry and the guide): both profiles from 1 to 128
2021
+ /// physical cores, nothing set explicitly. The driver ceiling is one per core in both;
2022
+ /// the profiles differ in the compaction share.
2023
+ #[test]
2024
+ fn the_budget_by_profile_and_core_count() {
2025
+ let table = [
2026
+ // cores, embedded compaction, server compaction
2027
+ (1, 1, 1),
2028
+ (2, 1, 1),
2029
+ (4, 1, 2),
2030
+ (8, 2, 4),
2031
+ (16, 4, 8),
2032
+ (32, 8, 16),
2033
+ (64, 16, 32),
2034
+ (128, 32, 64),
2035
+ ];
2036
+ for (cores, embedded, server) in table {
2037
+ assert_eq!(
2038
+ thread_budget(cores, CpuProfile::Embedded, None, None, None),
2039
+ b(cores, cores, false, embedded),
2040
+ "embedded, {cores} cores"
2041
+ );
2042
+ assert_eq!(
2043
+ thread_budget(cores, CpuProfile::Server, None, None, None),
2044
+ b(cores, cores, false, server),
2045
+ "server, {cores} cores"
2046
+ );
2047
+ }
2048
+ }
2049
+
2050
+ /// Explicit settings win and are kept as given; derived counts stay within one per shard
2051
+ /// and at least one.
2052
+ #[test]
2053
+ fn explicit_settings_win_and_the_budget_fills_the_rest() {
2054
+ let e = CpuProfile::Embedded;
2055
+ // A fixed driver count turns the controller off.
2056
+ assert_eq!(thread_budget(16, e, None, Some(2), None), b(16, 2, true, 4));
2057
+ assert_eq!(thread_budget(16, e, None, Some(0), None), b(16, 0, true, 4));
2058
+ // Compaction set (0: on the shards), kept as given, even past the shard count.
2059
+ assert_eq!(
2060
+ thread_budget(16, e, None, None, Some(0)),
2061
+ b(16, 16, false, 0)
2062
+ );
2063
+ assert_eq!(
2064
+ thread_budget(16, e, None, None, Some(20)),
2065
+ b(16, 16, false, 20)
2066
+ );
2067
+ // Fewer shards than cores: the ceiling and compaction stay within one per shard.
2068
+ assert_eq!(thread_budget(16, e, Some(2), None, None), b(2, 2, false, 2));
2069
+ // A 4-CPU container quota on a big host is 4 cores here (`default_shards`).
2070
+ assert_eq!(
2071
+ thread_budget(4, CpuProfile::Server, None, None, None),
2072
+ b(4, 4, false, 2)
2073
+ );
2074
+ }
2075
+ }