rsloop 0.1.44__tar.gz → 0.1.45__tar.gz

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 (244) hide show
  1. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/wheels.yml +4 -3
  2. {rsloop-0.1.44 → rsloop-0.1.45}/Cargo.lock +7 -17
  3. {rsloop-0.1.44 → rsloop-0.1.45}/Cargo.toml +13 -4
  4. {rsloop-0.1.44 → rsloop-0.1.45}/PKG-INFO +22 -1
  5. {rsloop-0.1.44 → rsloop-0.1.45}/README.md +21 -0
  6. {rsloop-0.1.44/vendor/vibeio → rsloop-0.1.45}/build.rs +3 -0
  7. {rsloop-0.1.44 → rsloop-0.1.45}/pyproject.toml +1 -1
  8. rsloop-0.1.45/scripts/build-pgo-wheels.sh +200 -0
  9. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/dispatcher.rs +9 -8
  10. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/loop_core.rs +6 -6
  11. {rsloop-0.1.44 → rsloop-0.1.45}/src/lib.rs +2 -0
  12. {rsloop-0.1.44 → rsloop-0.1.45}/src/platform/fd/mod.rs +1 -1
  13. {rsloop-0.1.44 → rsloop-0.1.45}/src/platform/windows_vibeio.rs +8 -5
  14. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/accept.rs +5 -5
  15. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/connect.rs +2 -2
  16. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/reader_task.rs +16 -16
  17. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/builder.rs +4 -4
  18. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/iocp.rs +11 -11
  19. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/kqueue.rs +4 -4
  20. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/mio.rs +7 -7
  21. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/mock.rs +4 -4
  22. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/mod.rs +13 -13
  23. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/driver/uring.rs +7 -7
  24. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/executor.rs +26 -37
  25. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/fd_inner.rs +1 -1
  26. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/fs/file.rs +18 -18
  27. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/fs/mod.rs +98 -96
  28. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/fs/open_options.rs +9 -9
  29. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/mod.rs +2 -2
  30. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/pipe.rs +3 -3
  31. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/splice.rs +1 -1
  32. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/stdio.rs +9 -7
  33. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/util.rs +25 -7
  34. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/lib.rs +10 -5
  35. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/tcp/listener.rs +8 -9
  36. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/tcp/mod.rs +4 -4
  37. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/tcp/stream.rs +5 -5
  38. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/udp.rs +11 -11
  39. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/unix/listener.rs +3 -3
  40. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/unix/mod.rs +5 -5
  41. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/unix/stream.rs +3 -3
  42. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/accept.rs +7 -7
  43. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/accept_unix.rs +4 -4
  44. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/connect.rs +12 -12
  45. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/fsync.rs +5 -5
  46. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/hard_link.rs +4 -4
  47. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/io_util.rs +2 -2
  48. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/mkdir.rs +4 -4
  49. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/mod.rs +4 -4
  50. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/open.rs +4 -4
  51. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/read.rs +9 -9
  52. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/readat.rs +8 -8
  53. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/readiness.rs +3 -3
  54. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/readv.rs +8 -8
  55. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/recv.rs +9 -9
  56. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/recvfrom.rs +11 -10
  57. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/rename.rs +4 -4
  58. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/send.rs +9 -9
  59. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/sendto.rs +9 -9
  60. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/splice.rs +6 -6
  61. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/statx.rs +4 -4
  62. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/symlink.rs +4 -4
  63. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/unlink.rs +4 -4
  64. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/waitpid.rs +5 -5
  65. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/write.rs +9 -9
  66. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/writeat.rs +8 -8
  67. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/op/writev.rs +10 -10
  68. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/process/mod.rs +16 -14
  69. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/process/reaper.rs +12 -9
  70. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/signal/mod.rs +2 -2
  71. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/signal/unix.rs +4 -4
  72. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/signal/windows.rs +4 -4
  73. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/task.rs +2 -2
  74. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/time/mod.rs +9 -9
  75. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/time/sleep.rs +2 -2
  76. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/util/async_wrap.rs +12 -9
  77. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/util/mod.rs +1 -1
  78. {rsloop-0.1.44 → rsloop-0.1.45}/uv.lock +1 -1
  79. rsloop-0.1.44/build.rs +0 -4
  80. rsloop-0.1.44/vendor/vibeio/.cargo-ok +0 -1
  81. rsloop-0.1.44/vendor/vibeio/Cargo.lock +0 -352
  82. rsloop-0.1.44/vendor/vibeio/Cargo.toml +0 -136
  83. rsloop-0.1.44/vendor/vibeio/benches/runtime.rs +0 -52
  84. {rsloop-0.1.44 → rsloop-0.1.45}/.cargo/config.toml +0 -0
  85. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/anyio.yml +0 -0
  86. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/kani.yml +0 -0
  87. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/mkdocs.yml +0 -0
  88. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/tests.yml +0 -0
  89. {rsloop-0.1.44 → rsloop-0.1.45}/.github/workflows/update-version.yml +0 -0
  90. {rsloop-0.1.44 → rsloop-0.1.45}/.gitignore +0 -0
  91. {rsloop-0.1.44 → rsloop-0.1.45}/.vscode/settings.json +0 -0
  92. {rsloop-0.1.44 → rsloop-0.1.45}/LICENSE +0 -0
  93. {rsloop-0.1.44 → rsloop-0.1.45}/benches/README.md +0 -0
  94. {rsloop-0.1.44 → rsloop-0.1.45}/benches/check_regression.py +0 -0
  95. {rsloop-0.1.44 → rsloop-0.1.45}/benches/compare_event_loops.py +0 -0
  96. {rsloop-0.1.44 → rsloop-0.1.45}/benches/workload_matrix.py +0 -0
  97. {rsloop-0.1.44 → rsloop-0.1.45}/docs/development.md +0 -0
  98. {rsloop-0.1.44 → rsloop-0.1.45}/docs/examples.md +0 -0
  99. {rsloop-0.1.44 → rsloop-0.1.45}/docs/getting-started.md +0 -0
  100. {rsloop-0.1.44 → rsloop-0.1.45}/docs/how-it-works.md +0 -0
  101. {rsloop-0.1.44 → rsloop-0.1.45}/docs/index.md +0 -0
  102. {rsloop-0.1.44 → rsloop-0.1.45}/docs/project-structure.md +0 -0
  103. {rsloop-0.1.44 → rsloop-0.1.45}/docs/rsloop.png +0 -0
  104. {rsloop-0.1.44 → rsloop-0.1.45}/docs/rust-extensions.md +0 -0
  105. {rsloop-0.1.44 → rsloop-0.1.45}/docs/verification.md +0 -0
  106. {rsloop-0.1.44 → rsloop-0.1.45}/examples/01_basics.py +0 -0
  107. {rsloop-0.1.44 → rsloop-0.1.45}/examples/02_fd_and_sockets.py +0 -0
  108. {rsloop-0.1.44 → rsloop-0.1.45}/examples/03_streams.py +0 -0
  109. {rsloop-0.1.44 → rsloop-0.1.45}/examples/04_unix_and_accepted_socket.py +0 -0
  110. {rsloop-0.1.44 → rsloop-0.1.45}/examples/05_pipes_signals_subprocesses.py +0 -0
  111. {rsloop-0.1.44 → rsloop-0.1.45}/examples/README.md +0 -0
  112. {rsloop-0.1.44 → rsloop-0.1.45}/examples/fastapi_service.py +0 -0
  113. {rsloop-0.1.44 → rsloop-0.1.45}/examples/picows_server.py +0 -0
  114. {rsloop-0.1.44 → rsloop-0.1.45}/examples/picows_test.py +0 -0
  115. {rsloop-0.1.44 → rsloop-0.1.45}/examples/wsbench_websockets.py +0 -0
  116. {rsloop-0.1.44 → rsloop-0.1.45}/justfile +0 -0
  117. {rsloop-0.1.44 → rsloop-0.1.45}/mkdocs.yml +0 -0
  118. {rsloop-0.1.44 → rsloop-0.1.45}/pyrightconfig.json +0 -0
  119. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/__init__.py +0 -0
  120. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/__init__.pyi +0 -0
  121. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/_bootstrap.py +0 -0
  122. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/_loop.pyi +0 -0
  123. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/_loop_compat.py +0 -0
  124. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/_profile.py +0 -0
  125. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/_run.py +0 -0
  126. {rsloop-0.1.44 → rsloop-0.1.45}/python/rsloop/py.typed +0 -0
  127. {rsloop-0.1.44 → rsloop-0.1.45}/qualirs.toml +0 -0
  128. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/build-wheels.sh +0 -0
  129. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/generate_test_tls_certs.py +0 -0
  130. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/prepare_anyio_rsloop_tests.py +0 -0
  131. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/python-versions.sh +0 -0
  132. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/run_python_tests.py +0 -0
  133. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/run_rust_tests.py +0 -0
  134. {rsloop-0.1.44 → rsloop-0.1.45}/scripts/test-supported-pythons.sh +0 -0
  135. {rsloop-0.1.44 → rsloop-0.1.45}/src/async_event.rs +0 -0
  136. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/asyncgens.rs +0 -0
  137. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/asyncio_cache.rs +0 -0
  138. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/connections.rs +0 -0
  139. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/executor.rs +0 -0
  140. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/ffi_helpers.rs +0 -0
  141. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/lifecycle.rs +0 -0
  142. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/methods.rs +0 -0
  143. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/pipes.rs +0 -0
  144. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/pre_exec.rs +0 -0
  145. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/process_handles.rs +0 -0
  146. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/process_spawn.rs +0 -0
  147. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/process_stdio.rs +0 -0
  148. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/servers.rs +0 -0
  149. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/signals.rs +0 -0
  150. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/sock_ops.rs +0 -0
  151. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/socket_connect.rs +0 -0
  152. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/sockets.rs +0 -0
  153. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/spawn_env.rs +0 -0
  154. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/tasks.rs +0 -0
  155. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/tls_params.rs +0 -0
  156. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api/watchers.rs +0 -0
  157. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/loop_api.rs +0 -0
  158. {rsloop-0.1.44 → rsloop-0.1.45}/src/bindings/mod.rs +0 -0
  159. {rsloop-0.1.44 → rsloop-0.1.45}/src/blocking.rs +0 -0
  160. {rsloop-0.1.44 → rsloop-0.1.45}/src/build_metadata.rs +0 -0
  161. {rsloop-0.1.44 → rsloop-0.1.45}/src/context.rs +0 -0
  162. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/callbacks.rs +0 -0
  163. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/commands.rs +0 -0
  164. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/dispatcher/timer_entry.rs +0 -0
  165. {rsloop-0.1.44 → rsloop-0.1.45}/src/engine/mod.rs +0 -0
  166. {rsloop-0.1.44 → rsloop-0.1.45}/src/errors.rs +0 -0
  167. {rsloop-0.1.44 → rsloop-0.1.45}/src/module_init.rs +0 -0
  168. {rsloop-0.1.44 → rsloop-0.1.45}/src/platform/fd/windows.rs +0 -0
  169. {rsloop-0.1.44 → rsloop-0.1.45}/src/platform/mod.rs +0 -0
  170. {rsloop-0.1.44 → rsloop-0.1.45}/src/profiler.rs +0 -0
  171. {rsloop-0.1.44 → rsloop-0.1.45}/src/python_names.rs +0 -0
  172. {rsloop-0.1.44 → rsloop-0.1.45}/src/rust_async.rs +0 -0
  173. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/mod.rs +0 -0
  174. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/core_events.rs +0 -0
  175. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/core_protocol.rs +0 -0
  176. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/core_state.rs +0 -0
  177. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/mod.rs +0 -0
  178. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/params.rs +0 -0
  179. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/py_pipes.rs +0 -0
  180. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/py_transport.rs +0 -0
  181. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/spawn.rs +0 -0
  182. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/process/worker.rs +0 -0
  183. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/buffers.rs +0 -0
  184. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/builder.rs +0 -0
  185. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/core_events.rs +0 -0
  186. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/core_protocol.rs +0 -0
  187. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/core_state.rs +0 -0
  188. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/core_write.rs +0 -0
  189. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/fast.rs +0 -0
  190. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/io_targets.rs +0 -0
  191. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/mod.rs +0 -0
  192. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/pipe_transport.rs +0 -0
  193. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/platform.rs +0 -0
  194. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/poll.rs +0 -0
  195. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/protocol.rs +0 -0
  196. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/py_server.rs +0 -0
  197. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/py_transport.rs +0 -0
  198. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/reader.rs +0 -0
  199. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/server.rs +0 -0
  200. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/server_core.rs +0 -0
  201. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/server_types.rs +0 -0
  202. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/socket_transport.rs +0 -0
  203. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/stats.rs +0 -0
  204. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/tls_session.rs +0 -0
  205. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/tls_transport.rs +0 -0
  206. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/tuning.rs +0 -0
  207. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/worker.rs +0 -0
  208. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/write_queue.rs +0 -0
  209. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/stream/writer.rs +0 -0
  210. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/tls/material.rs +0 -0
  211. {rsloop-0.1.44 → rsloop-0.1.45}/src/transport/tls/mod.rs +0 -0
  212. {rsloop-0.1.44 → rsloop-0.1.45}/src/verification.rs +0 -0
  213. rsloop-0.1.44/vendor/vibeio/README.md → rsloop-0.1.45/src/vibeio/UPSTREAM.md +0 -0
  214. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/blocking/default.rs +0 -0
  215. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/blocking/mod.rs +0 -0
  216. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/fs/metadata.rs +0 -0
  217. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/io/buf.rs +0 -0
  218. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/net/mod.rs +0 -0
  219. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/time/interval.rs +0 -0
  220. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/time/timeout.rs +0 -0
  221. {rsloop-0.1.44/vendor/vibeio/src → rsloop-0.1.45/src/vibeio}/timer.rs +1 -1
  222. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/_smoke.py +0 -0
  223. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/aiohttp_test.py +0 -0
  224. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/anyio_test.py +0 -0
  225. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/daphne_test.py +0 -0
  226. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/django_asgi_test.py +0 -0
  227. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/falcon_test.py +0 -0
  228. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/fastapi_test.py +0 -0
  229. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/faststream_test.py +0 -0
  230. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/hypercorn_test.py +0 -0
  231. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/litestar_granian_test.py +0 -0
  232. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/litestar_test.py +0 -0
  233. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/mangum_test.py +0 -0
  234. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/quart_test.py +0 -0
  235. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/sanic_test.py +0 -0
  236. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/starlette_test.py +0 -0
  237. {rsloop-0.1.44 → rsloop-0.1.45}/tests/packages/uvicorn_test.py +0 -0
  238. {rsloop-0.1.44 → rsloop-0.1.45}/tests/proptest-regressions/transport/stream/fast.txt +0 -0
  239. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_compat.py +0 -0
  240. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_free_threading.py +0 -0
  241. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_public_api.py +0 -0
  242. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_run.py +0 -0
  243. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_stream_reader.py +0 -0
  244. {rsloop-0.1.44 → rsloop-0.1.45}/tests/test_tls.py +0 -0
@@ -62,7 +62,8 @@ jobs:
62
62
  - name: Set up Rust
63
63
  uses: dtolnay/rust-toolchain@stable
64
64
  with:
65
- toolchain: 1.95.0
65
+ toolchain: stable
66
+ components: llvm-tools-preview
66
67
 
67
68
  - name: Cache Cargo registry and target
68
69
  uses: Swatinem/rust-cache@v2
@@ -72,7 +73,7 @@ jobs:
72
73
  shell: bash
73
74
  env:
74
75
  RSLOOP_PYTHON_VERSIONS: ${{ matrix.python_versions }}
75
- run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}"
76
+ run: scripts/build-pgo-wheels.sh --out dist --target "${{ matrix.rust_target }}"
76
77
 
77
78
  - name: Upload wheel artifacts
78
79
  uses: actions/upload-artifact@v4
@@ -102,7 +103,7 @@ jobs:
102
103
  - name: Set up Rust
103
104
  uses: dtolnay/rust-toolchain@stable
104
105
  with:
105
- toolchain: 1.95.0
106
+ toolchain: stable
106
107
 
107
108
  - name: Cache Cargo registry and target
108
109
  uses: Swatinem/rust-cache@v2
@@ -922,14 +922,19 @@ dependencies = [
922
922
 
923
923
  [[package]]
924
924
  name = "rsloop"
925
- version = "0.1.44"
925
+ version = "0.1.45"
926
926
  dependencies = [
927
927
  "async-io",
928
928
  "async-std",
929
929
  "crossbeam-channel",
930
+ "crossbeam-queue",
930
931
  "futures",
932
+ "futures-util",
933
+ "io-uring",
931
934
  "libc",
932
935
  "memchr",
936
+ "mio",
937
+ "oneshot",
933
938
  "profiling",
934
939
  "proptest",
935
940
  "pyo3",
@@ -939,10 +944,10 @@ dependencies = [
939
944
  "rustls-native-certs",
940
945
  "rustls-pemfile",
941
946
  "signal-hook",
947
+ "slab",
942
948
  "socket2",
943
949
  "tokio",
944
950
  "tracy-client",
945
- "vibeio",
946
951
  "windows-sys 0.61.2",
947
952
  ]
948
953
 
@@ -1259,21 +1264,6 @@ version = "1.12.0"
1259
1264
  source = "registry+https://github.com/rust-lang/crates.io-index"
1260
1265
  checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0"
1261
1266
 
1262
- [[package]]
1263
- name = "vibeio"
1264
- version = "0.2.15"
1265
- dependencies = [
1266
- "crossbeam-queue",
1267
- "futures-util",
1268
- "io-uring",
1269
- "libc",
1270
- "mio",
1271
- "oneshot",
1272
- "slab",
1273
- "tokio",
1274
- "windows-sys 0.61.2",
1275
- ]
1276
-
1277
1267
  [[package]]
1278
1268
  name = "wasi"
1279
1269
  version = "0.11.1+wasi-snapshot-preview1"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "rsloop"
3
- version = "0.1.44"
3
+ version = "0.1.45"
4
4
  edition = "2024"
5
5
  description = "An event loop for asyncio written in Rust"
6
6
  license = "Apache-2.0"
@@ -21,9 +21,13 @@ profiler = ["dep:tracy-client", "profiling/profile-with-tracy"]
21
21
  async-io = "2"
22
22
  async-std = "1"
23
23
  crossbeam-channel = "0.5"
24
+ crossbeam-queue = "0.3"
24
25
  futures = { version = "0.3", default-features = false, features = ["std"] }
26
+ futures-util = "0.3"
25
27
  libc = "0.2"
26
28
  memchr = "2"
29
+ mio = "1"
30
+ oneshot = { version = "0.2", features = ["async", "std"] }
27
31
  profiling = "1"
28
32
  pyo3 = { version = "0.29.2" }
29
33
  pyo3-async-runtimes = { version = "0.29", features = ["async-std-runtime"] }
@@ -31,13 +35,18 @@ rustls = "0.23"
31
35
  rustls-native-certs = "0.8"
32
36
  rustls-pemfile = "2"
33
37
  signal-hook = "0.4"
38
+ slab = "0.4"
34
39
  socket2 = "0.6"
35
40
  tokio = { version = "1", default-features = false, features = ["io-util"] }
36
41
  tracy-client = { version = "0.18", default-features = false, features = ["enable", "only-localhost", "sampling"], optional = true }
37
- vibeio = { version = "0.2.15", path = "vendor/vibeio", default-features = false, features = ["time"] }
42
+ [target.'cfg(target_os = "linux")'.dependencies]
43
+ io-uring = "0.6"
44
+
45
+ [target.'cfg(unix)'.dependencies]
46
+ mio = { version = "1", features = ["os-poll", "os-ext"] }
38
47
 
39
48
  [target.'cfg(windows)'.dependencies]
40
- windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Threading"] }
49
+ windows-sys = { version = "0.61", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Wdk_System_IO", "Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Threading"] }
41
50
 
42
51
  [build-dependencies]
43
52
  pyo3-build-config = "0.29.2"
@@ -83,7 +92,7 @@ borrow_as_ptr = "allow"
83
92
  ref_as_ptr = "allow"
84
93
 
85
94
  [lints.rust]
86
- unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
95
+ unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)", "cfg(musl_v1_2_3)", "cfg(syscall_accept4)", "cfg(syscall_pipe2)", "cfg(feature, values(\"blocking-default\", \"fs\", \"pipe\", \"process\", \"signal\", \"splice\", \"stdio\"))"] }
87
96
 
88
97
  [package.metadata.kani.flags]
89
98
  # Force every proof that reaches a loop to state and review its own bound.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rsloop
3
- Version: 0.1.44
3
+ Version: 0.1.45
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -379,6 +379,27 @@ Build release wheels into `dist/wheels`:
379
379
  scripts/build-wheels.sh
380
380
  ```
381
381
 
382
+ Build the published-wheel configuration with profile-guided optimization:
383
+
384
+ ```bash
385
+ rustup component add llvm-tools-preview
386
+ scripts/build-pgo-wheels.sh
387
+ ```
388
+
389
+ For each requested Python ABI, the PGO wrapper creates an instrumented wheel,
390
+ trains it on sustained HTTP, TLS, WebSocket, mixed-stream, bulk-transfer,
391
+ idle-connection, callback, task, and TCP workloads, merges the resulting LLVM
392
+ profiles, and builds that ABI's final wheel with its matching profile. Per-ABI
393
+ training avoids discarding counters when PyO3's generated control flow differs
394
+ between Python versions or free-threaded builds. The target must be native
395
+ because the instrumented extension runs during training.
396
+
397
+ Set `RSLOOP_PGO_SCENARIOS` to override the comma-separated network scenarios.
398
+ Tagged and manually dispatched wheel workflows use PGO on every supported
399
+ platform except Windows ARM64. Rust profile-generation binaries currently
400
+ crash on that target ([rust-lang/rust#156675](https://github.com/rust-lang/rust/issues/156675)),
401
+ so it temporarily falls back to the normal fat-LTO release build.
402
+
382
403
  [`scripts/build-wheels.sh`](./scripts/build-wheels.sh) currently defaults to
383
404
  CPython `3.10 3.11 3.12 3.13 3.14`, and
384
405
  uses `uv python install` / `uv python find` to locate interpreters.
@@ -347,6 +347,27 @@ Build release wheels into `dist/wheels`:
347
347
  scripts/build-wheels.sh
348
348
  ```
349
349
 
350
+ Build the published-wheel configuration with profile-guided optimization:
351
+
352
+ ```bash
353
+ rustup component add llvm-tools-preview
354
+ scripts/build-pgo-wheels.sh
355
+ ```
356
+
357
+ For each requested Python ABI, the PGO wrapper creates an instrumented wheel,
358
+ trains it on sustained HTTP, TLS, WebSocket, mixed-stream, bulk-transfer,
359
+ idle-connection, callback, task, and TCP workloads, merges the resulting LLVM
360
+ profiles, and builds that ABI's final wheel with its matching profile. Per-ABI
361
+ training avoids discarding counters when PyO3's generated control flow differs
362
+ between Python versions or free-threaded builds. The target must be native
363
+ because the instrumented extension runs during training.
364
+
365
+ Set `RSLOOP_PGO_SCENARIOS` to override the comma-separated network scenarios.
366
+ Tagged and manually dispatched wheel workflows use PGO on every supported
367
+ platform except Windows ARM64. Rust profile-generation binaries currently
368
+ crash on that target ([rust-lang/rust#156675](https://github.com/rust-lang/rust/issues/156675)),
369
+ so it temporarily falls back to the normal fat-LTO release build.
370
+
350
371
  [`scripts/build-wheels.sh`](./scripts/build-wheels.sh) currently defaults to
351
372
  CPython `3.10 3.11 3.12 3.13 3.14`, and
352
373
  uses `uv python install` / `uv python find` to locate interpreters.
@@ -1,4 +1,7 @@
1
1
  fn main() {
2
+ pyo3_build_config::use_pyo3_cfgs();
3
+ pyo3_build_config::add_extension_module_link_args();
4
+
2
5
  let musl = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default() == "musl";
3
6
  let musl_v1_2_3 = std::env::var("RUST_LIBC_UNSTABLE_MUSL_V1_2_3").is_ok();
4
7
  println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_MUSL_V1_2_3");
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "rsloop"
7
- version = "0.1.44"
7
+ version = "0.1.45"
8
8
  description = "An event loop for asyncio written in Rust"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ source "${ROOT_DIR}/scripts/python-versions.sh"
6
+
7
+ DEFAULT_PGO_SCENARIOS="http_keepalive,tls_http,websocket_messages,websocket_tls,mixed_streams,bulk_transfer,idle_connections"
8
+ BUILD_WHEEL_ARGS=("$@")
9
+ RUST_TARGET="${RSLOOP_RUST_TARGET:-}"
10
+ INSTALL_PYTHONS=1
11
+ MATURIN_ARGS=()
12
+
13
+ usage() {
14
+ cat <<'EOF'
15
+ Build PGO-optimized release wheels for rsloop.
16
+
17
+ Usage:
18
+ scripts/build-pgo-wheels.sh [build-wheels options] [-- maturin args...]
19
+
20
+ This wrapper accepts the same options as scripts/build-wheels.sh. For each
21
+ requested Python ABI, it builds an instrumented native wheel, trains it with
22
+ representative traffic, merges the LLVM profiles, and builds that ABI's final
23
+ wheel with its matching profile.
24
+
25
+ Environment:
26
+ RSLOOP_PGO_SCENARIOS Comma-separated workload-matrix training scenarios
27
+
28
+ PGO requires a native target and the Rust llvm-tools-preview component.
29
+ EOF
30
+ }
31
+
32
+ host_rust_target() {
33
+ rustc -vV | sed -n 's/^host: //p'
34
+ }
35
+
36
+ native_path() {
37
+ case "${OSTYPE:-}" in
38
+ msys*|cygwin*) cygpath -m "$1" ;;
39
+ *) printf '%s\n' "$1" ;;
40
+ esac
41
+ }
42
+
43
+ shell_path() {
44
+ case "${OSTYPE:-}" in
45
+ msys*|cygwin*) cygpath -u "$1" ;;
46
+ *) printf '%s\n' "$1" ;;
47
+ esac
48
+ }
49
+
50
+ while (($#)); do
51
+ case "$1" in
52
+ -o|--out)
53
+ (($# >= 2)) || { echo "missing value for $1" >&2; exit 1; }
54
+ shift 2
55
+ ;;
56
+ -t|--target)
57
+ (($# >= 2)) || { echo "missing value for $1" >&2; exit 1; }
58
+ RUST_TARGET="$2"
59
+ shift 2
60
+ ;;
61
+ --skip-python-install)
62
+ INSTALL_PYTHONS=0
63
+ shift
64
+ ;;
65
+ -h|--help)
66
+ usage
67
+ printf '\nUnderlying wheel-builder options:\n\n'
68
+ "${ROOT_DIR}/scripts/build-wheels.sh" --help
69
+ exit 0
70
+ ;;
71
+ --)
72
+ shift
73
+ MATURIN_ARGS=("$@")
74
+ break
75
+ ;;
76
+ *)
77
+ echo "unknown argument: $1" >&2
78
+ usage >&2
79
+ exit 1
80
+ ;;
81
+ esac
82
+ done
83
+
84
+ cd "$ROOT_DIR"
85
+ HOST_RUST_TARGET="$(host_rust_target)"
86
+ if [[ -n "$RUST_TARGET" && "$RUST_TARGET" != "$HOST_RUST_TARGET" ]]; then
87
+ echo "PGO requires a native target because the instrumented wheel must run during training" >&2
88
+ echo "host target: ${HOST_RUST_TARGET}; requested target: ${RUST_TARGET}" >&2
89
+ exit 1
90
+ fi
91
+ if [[ "$RUST_TARGET" == *-apple-darwin ]]; then
92
+ export MACOSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET:-13.0}"
93
+ fi
94
+ if [[ "$RUST_TARGET" == "aarch64-pc-windows-msvc" ]]; then
95
+ # rustc profile-generate binaries currently crash on native Windows ARM64:
96
+ # https://github.com/rust-lang/rust/issues/156675
97
+ echo "PGO is unavailable on Windows ARM64; building a normal fat-LTO release wheel"
98
+ export RUSTFLAGS="${RUSTFLAGS:-} -Clink-arg=/arm64hazardfree"
99
+ exec "${ROOT_DIR}/scripts/build-wheels.sh" "${BUILD_WHEEL_ARGS[@]}"
100
+ fi
101
+
102
+ RSLOOP_PYTHON_VERSIONS_OVERRIDE="${RSLOOP_PYTHON_VERSIONS:-}"
103
+ rsloop_load_python_versions "$RUST_TARGET"
104
+ PYTHON_VERSIONS=("${RSLOOP_PYTHON_VERSIONS[@]}")
105
+ PGO_SCENARIOS="${RSLOOP_PGO_SCENARIOS:-$DEFAULT_PGO_SCENARIOS}"
106
+
107
+ rust_sysroot="$(shell_path "$(rustc --print sysroot)")"
108
+ llvm_profdata="${rust_sysroot}/lib/rustlib/${HOST_RUST_TARGET}/bin/llvm-profdata"
109
+ if [[ "${OSTYPE:-}" == msys* || "${OSTYPE:-}" == cygwin* ]]; then
110
+ llvm_profdata+=".exe"
111
+ fi
112
+ if [[ ! -x "$llvm_profdata" ]]; then
113
+ echo "llvm-profdata was not found at ${llvm_profdata}" >&2
114
+ echo "install it with: rustup component add llvm-tools-preview" >&2
115
+ exit 1
116
+ fi
117
+
118
+ PGO_WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/rsloop-wheel-pgo.XXXXXX")"
119
+ cleanup() {
120
+ if [[ -n "${PGO_WORK_DIR:-}" && -d "$PGO_WORK_DIR" ]]; then
121
+ rm -rf -- "$PGO_WORK_DIR"
122
+ fi
123
+ }
124
+ trap cleanup EXIT
125
+
126
+ PROFILE_DIR="${PGO_WORK_DIR}/profiles"
127
+ TARGET_GENERATE="$(native_path "${PGO_WORK_DIR}/target-generate")"
128
+ TARGET_USE="$(native_path "${PGO_WORK_DIR}/target-use")"
129
+ MERGED_PROFILE="${PGO_WORK_DIR}/merged.profdata"
130
+ mkdir -p "$PROFILE_DIR"
131
+ BASE_RUSTFLAGS="${RUSTFLAGS:-}"
132
+ GENERATE_RUSTFLAGS="${BASE_RUSTFLAGS} -Cprofile-generate=$(native_path "$PROFILE_DIR")"
133
+ USE_RUSTFLAGS="${BASE_RUSTFLAGS} -Cprofile-use=$(native_path "$MERGED_PROFILE") -Cllvm-args=-pgo-warn-missing-function"
134
+
135
+ for version in "${PYTHON_VERSIONS[@]}"; do
136
+ python_request="$version"
137
+ if [[ -n "$RUST_TARGET" ]]; then
138
+ python_request="$(rsloop_target_python_request "$version" "$RUST_TARGET")"
139
+ fi
140
+ if (( INSTALL_PYTHONS )); then
141
+ uv python install "$python_request"
142
+ fi
143
+
144
+ version_key="${version//[^a-zA-Z0-9]/_}"
145
+ version_dir="${PGO_WORK_DIR}/${version_key}"
146
+ wheel_dir="${version_dir}/instrumented-wheel"
147
+ tls_dir="${version_dir}/tls"
148
+ training_venv="${version_dir}/venv"
149
+ mkdir -p "$wheel_dir"
150
+ find "$PROFILE_DIR" -maxdepth 1 -type f -name '*.profraw' -delete
151
+
152
+ instrumented_build=(uv run --no-project --python "$python_request" --with maturin maturin build --release --interpreter "$(uv python find "$python_request")" --out "$wheel_dir")
153
+ if [[ -n "$RUST_TARGET" ]]; then
154
+ instrumented_build+=(--target "$RUST_TARGET")
155
+ fi
156
+ if ((${#MATURIN_ARGS[@]})); then
157
+ instrumented_build+=("${MATURIN_ARGS[@]}")
158
+ fi
159
+ echo "Building instrumented PGO training wheel for Python ${version}"
160
+ CARGO_TARGET_DIR="$TARGET_GENERATE" RUSTFLAGS="$GENERATE_RUSTFLAGS" "${instrumented_build[@]}"
161
+
162
+ shopt -s nullglob
163
+ instrumented_wheels=("$wheel_dir"/*.whl)
164
+ shopt -u nullglob
165
+ if ((${#instrumented_wheels[@]} != 1)); then
166
+ echo "expected one instrumented training wheel, found ${#instrumented_wheels[@]}" >&2
167
+ exit 1
168
+ fi
169
+
170
+ uv venv --no-project --python "$python_request" "$training_venv"
171
+ if [[ -x "$training_venv/Scripts/python.exe" ]]; then
172
+ training_python="$training_venv/Scripts/python.exe"
173
+ else
174
+ training_python="$training_venv/bin/python"
175
+ fi
176
+ uv pip install --python "$training_python" "${instrumented_wheels[0]}"
177
+ "$training_python" scripts/generate_test_tls_certs.py "$tls_dir"
178
+
179
+ echo "Training Python ${version} PGO with sustained representative network traffic"
180
+ "$training_python" benches/workload_matrix.py --loops rsloop --scenarios "$PGO_SCENARIOS" --sustained --tls-dir "$tls_dir"
181
+ echo "Training Python ${version} PGO with callbacks, tasks, and TCP streams"
182
+ "$training_python" benches/compare_event_loops.py --loops rsloop
183
+
184
+ shopt -s nullglob
185
+ raw_profiles=("$PROFILE_DIR"/*.profraw)
186
+ shopt -u nullglob
187
+ if ((${#raw_profiles[@]} == 0)); then
188
+ echo "PGO training produced no .profraw files for Python ${version}" >&2
189
+ exit 1
190
+ fi
191
+
192
+ echo "Merging ${#raw_profiles[@]} LLVM profile shards for Python ${version}"
193
+ "$llvm_profdata" merge -o "$MERGED_PROFILE" "${raw_profiles[@]}"
194
+ echo "Building final Python ${version} wheel with its matching PGO profile"
195
+ RSLOOP_PYTHON_VERSIONS="$version" \
196
+ CARGO_TARGET_DIR="$TARGET_USE" \
197
+ RUSTFLAGS="$USE_RUSTFLAGS" \
198
+ "${ROOT_DIR}/scripts/build-wheels.sh" "${BUILD_WHEEL_ARGS[@]}"
199
+ rm -rf -- "$version_dir"
200
+ done
@@ -36,7 +36,7 @@ fn timer_wait_needs_replacement<T: PartialEq>(current: Option<&T>, deadline: &T)
36
36
  struct RuntimeDispatcher {
37
37
  core: Arc<LoopCore>,
38
38
  command_rx: Receiver<LoopCommand>,
39
- timer_wait: Option<(Instant, vibeio::time::Sleep)>,
39
+ timer_wait: Option<(Instant, crate::vibeio::time::Sleep)>,
40
40
  ready_batch: VecDeque<ReadyItem>,
41
41
  timers: BinaryHeap<TimerEntry>,
42
42
  next_timer_id: u64,
@@ -68,7 +68,7 @@ enum WatchTask {
68
68
  stop: Arc<AtomicBool>,
69
69
  join: thread::JoinHandle<()>,
70
70
  },
71
- Vibeio(vibeio::JoinHandle<()>),
71
+ Vibeio(crate::vibeio::JoinHandle<()>),
72
72
  }
73
73
 
74
74
  impl WatchTask {
@@ -118,7 +118,7 @@ pub fn run_runtime_thread(core: Arc<LoopCore>, command_rx: Receiver<LoopCommand>
118
118
  if tracy_client::Client::is_running() {
119
119
  tracy_client::set_thread_name!("rsloop-runtime");
120
120
  }
121
- let runtime = vibeio::RuntimeBuilder::new()
121
+ let runtime = crate::vibeio::RuntimeBuilder::new()
122
122
  .rsloop_profile()
123
123
  .enable_timer(true)
124
124
  .build()
@@ -188,7 +188,8 @@ impl Future for RuntimeDispatcher {
188
188
  &deadline,
189
189
  );
190
190
  if replace_timer {
191
- self.timer_wait = Some((deadline, vibeio::time::Sleep::sleep_until(deadline)));
191
+ self.timer_wait =
192
+ Some((deadline, crate::vibeio::time::Sleep::sleep_until(deadline)));
192
193
  }
193
194
  let (_, sleep) = self.timer_wait.as_mut().expect("timer wait missing");
194
195
  if Pin::new(sleep).poll(cx).is_ready() {
@@ -447,13 +448,13 @@ impl RuntimeDispatcher {
447
448
 
448
449
  let task = match reader {
449
450
  crate::transport::stream::ReaderTarget::Tcp(stream) => {
450
- WatchTask::Vibeio(vibeio::spawn(
451
+ WatchTask::Vibeio(crate::vibeio::spawn(
451
452
  crate::transport::stream::run_tcp_socket_reader_task(core, stream),
452
453
  ))
453
454
  }
454
455
  #[cfg(unix)]
455
456
  crate::transport::stream::ReaderTarget::Unix(stream) => {
456
- WatchTask::Vibeio(vibeio::spawn(
457
+ WatchTask::Vibeio(crate::vibeio::spawn(
457
458
  crate::transport::stream::run_unix_socket_reader_task(core, stream),
458
459
  ))
459
460
  }
@@ -481,7 +482,7 @@ impl RuntimeDispatcher {
481
482
  cancel_watch_task(task);
482
483
  }
483
484
 
484
- let task = WatchTask::Vibeio(vibeio::spawn(
485
+ let task = WatchTask::Vibeio(crate::vibeio::spawn(
485
486
  crate::transport::stream::run_server_accept_task(server, listener),
486
487
  ));
487
488
 
@@ -499,7 +500,7 @@ impl RuntimeDispatcher {
499
500
  // vibeio JoinHandle has no Drop, so dropping it detaches (does
500
501
  // not cancel) the running task.
501
502
  let core = Arc::clone(&self.core);
502
- std::mem::drop(vibeio::spawn(
503
+ std::mem::drop(crate::vibeio::spawn(
503
504
  crate::transport::stream::run_connect_watch_task(core, fd, future),
504
505
  ));
505
506
  }
@@ -41,7 +41,7 @@ thread_local! {
41
41
  /// are still alive). If a loop is never closed, its runtime is leaked at
42
42
  /// thread exit rather than dropped — dropping during TLS destruction trips
43
43
  /// an AccessError panic inside vibeio's `Runtime::drop`.
44
- static LOOP_RUNTIMES: RefCell<HashMap<usize, std::mem::ManuallyDrop<vibeio::Runtime>>> =
44
+ static LOOP_RUNTIMES: RefCell<HashMap<usize, std::mem::ManuallyDrop<crate::vibeio::Runtime>>> =
45
45
  RefCell::new(HashMap::new());
46
46
 
47
47
  /// Handles for cancellable I/O tasks (accept loops, socket readers) spawned
@@ -50,7 +50,7 @@ thread_local! {
50
50
  /// here) never conflicts with the park holding an immutable `LOOP_RUNTIMES`
51
51
  /// borrow across `block_on`. `JoinHandle` is `!Send`, so this must live in
52
52
  /// TLS on the loop thread.
53
- static IO_TASKS: RefCell<HashMap<usize, HashMap<RawFd, vibeio::JoinHandle<()>>>> =
53
+ static IO_TASKS: RefCell<HashMap<usize, HashMap<RawFd, crate::vibeio::JoinHandle<()>>>> =
54
54
  RefCell::new(HashMap::new());
55
55
  }
56
56
 
@@ -90,14 +90,14 @@ impl LoopWake {
90
90
  /// GIL and drains.
91
91
  struct WaitForWake {
92
92
  wake: Arc<LoopWake>,
93
- sleep: Pin<Box<vibeio::time::Sleep>>,
93
+ sleep: Pin<Box<crate::vibeio::time::Sleep>>,
94
94
  }
95
95
 
96
96
  impl WaitForWake {
97
97
  fn new(wake: Arc<LoopWake>, timeout: Duration) -> Self {
98
98
  Self {
99
99
  wake,
100
- sleep: Box::pin(vibeio::time::Sleep::new(timeout)),
100
+ sleep: Box::pin(crate::vibeio::time::Sleep::new(timeout)),
101
101
  }
102
102
  }
103
103
  }
@@ -500,7 +500,7 @@ impl LoopCore {
500
500
  .entry(loop_runtime_key)
501
501
  .or_insert_with(|| {
502
502
  std::mem::ManuallyDrop::new(
503
- vibeio::RuntimeBuilder::new()
503
+ crate::vibeio::RuntimeBuilder::new()
504
504
  .rsloop_profile()
505
505
  .enable_timer(true)
506
506
  .build()
@@ -1425,7 +1425,7 @@ mod wake_tests {
1425
1425
 
1426
1426
  #[test]
1427
1427
  fn wait_for_wake_completes_when_its_timer_expires() {
1428
- let runtime = vibeio::RuntimeBuilder::new()
1428
+ let runtime = crate::vibeio::RuntimeBuilder::new()
1429
1429
  .enable_timer(true)
1430
1430
  .build()
1431
1431
  .expect("timer-enabled runtime");
@@ -28,6 +28,8 @@ pub mod rust_async;
28
28
  mod transport;
29
29
  #[cfg(kani)]
30
30
  mod verification;
31
+ #[path = "vibeio/lib.rs"]
32
+ pub(crate) mod vibeio;
31
33
 
32
34
  pub(crate) use platform::fd as fd_ops;
33
35
  #[cfg(windows)]
@@ -121,7 +121,7 @@ pub async fn wait_readable(fd: RawFd) -> PyResult<()> {
121
121
  let (tx, rx) = futures::channel::oneshot::channel();
122
122
  let task = crate::windows_vibeio::spawn(move || async move {
123
123
  let result = async {
124
- let stream = vibeio::net::PollTcpStream::from_std(stream)?;
124
+ let stream = crate::vibeio::net::PollTcpStream::from_std(stream)?;
125
125
  let mut buf = [0_u8; 1];
126
126
  stream.peek(&mut buf).await.map(|_| ())
127
127
  }
@@ -109,8 +109,11 @@ fn spawn_service_thread(
109
109
  #[cfg(windows)]
110
110
  fn build_service_runtime(
111
111
  ready_tx: &std::sync::mpsc::SyncSender<Result<(), String>>,
112
- ) -> Result<vibeio::Runtime, ()> {
113
- match vibeio::RuntimeBuilder::new().rsloop_profile().build() {
112
+ ) -> Result<crate::vibeio::Runtime, ()> {
113
+ match crate::vibeio::RuntimeBuilder::new()
114
+ .rsloop_profile()
115
+ .build()
116
+ {
114
117
  Ok(runtime) => Ok(runtime),
115
118
  Err(err) => {
116
119
  let _ = ready_tx.send(Err(err.to_string()));
@@ -124,7 +127,7 @@ async fn run_service_commands(
124
127
  mut rx: mpsc::UnboundedReceiver<Command>,
125
128
  thread_tx: mpsc::UnboundedSender<Command>,
126
129
  ) {
127
- let mut tasks: HashMap<u64, vibeio::JoinHandle<()>> = HashMap::new();
130
+ let mut tasks: HashMap<u64, crate::vibeio::JoinHandle<()>> = HashMap::new();
128
131
 
129
132
  while let Some(command) = rx.next().await {
130
133
  handle_service_command(command, &thread_tx, &mut tasks);
@@ -139,12 +142,12 @@ async fn run_service_commands(
139
142
  fn handle_service_command(
140
143
  command: Command,
141
144
  thread_tx: &mpsc::UnboundedSender<Command>,
142
- tasks: &mut HashMap<u64, vibeio::JoinHandle<()>>,
145
+ tasks: &mut HashMap<u64, crate::vibeio::JoinHandle<()>>,
143
146
  ) {
144
147
  match command {
145
148
  Command::Spawn { id, factory } => {
146
149
  let finished_tx = thread_tx.clone();
147
- let handle = vibeio::spawn(async move {
150
+ let handle = crate::vibeio::spawn(async move {
148
151
  factory().await;
149
152
  let _ = finished_tx.unbounded_send(Command::Finished { id });
150
153
  });
@@ -26,11 +26,11 @@ use std::rc::Rc;
26
26
  use std::sync::Arc;
27
27
  use std::sync::atomic::{AtomicBool, Ordering};
28
28
 
29
+ use crate::vibeio::net::TcpListener as VibeTcpListener;
30
+ #[cfg(unix)]
31
+ use crate::vibeio::net::UnixListener as VibeUnixListener;
29
32
  use pyo3::exceptions::PyRuntimeError;
30
33
  use pyo3::prelude::*;
31
- use vibeio::net::TcpListener as VibeTcpListener;
32
- #[cfg(unix)]
33
- use vibeio::net::UnixListener as VibeUnixListener;
34
34
 
35
35
  use super::io_targets::StreamKind;
36
36
  #[cfg(windows)]
@@ -296,7 +296,7 @@ pub(super) async fn run_tcp_accept_task(server: Arc<ServerCore>, listener: StdTc
296
296
  }
297
297
 
298
298
  #[cfg(windows)]
299
- pub(super) struct WindowsAcceptPool(Vec<vibeio::JoinHandle<()>>);
299
+ pub(super) struct WindowsAcceptPool(Vec<crate::vibeio::JoinHandle<()>>);
300
300
 
301
301
  #[cfg(windows)]
302
302
  impl Drop for WindowsAcceptPool {
@@ -322,7 +322,7 @@ pub(super) async fn run_windows_tcp_accept_pool(server: Arc<ServerCore>, listene
322
322
  };
323
323
  let lanes = (0..lane_count)
324
324
  .map(|_| {
325
- vibeio::spawn(run_windows_tcp_accept_lane(
325
+ crate::vibeio::spawn(run_windows_tcp_accept_lane(
326
326
  Arc::clone(&server),
327
327
  Rc::clone(&listener),
328
328
  ))
@@ -6,8 +6,8 @@ use std::os::fd::FromRawFd;
6
6
  use std::os::raw::c_int;
7
7
  use std::sync::Arc;
8
8
 
9
+ use crate::vibeio::net::PollTcpStream as VibePollTcpStream;
9
10
  use pyo3::prelude::*;
10
- use vibeio::net::PollTcpStream as VibePollTcpStream;
11
11
 
12
12
  use crate::engine::{LoopCommand, LoopCore};
13
13
  use crate::fd_ops;
@@ -23,7 +23,7 @@ pub(crate) async fn run_connect_watch_task(
23
23
  fd: fd_ops::RawFd,
24
24
  future: Py<PyAny>,
25
25
  ) {
26
- use vibeio::io::AsyncWritePoll;
26
+ use crate::vibeio::io::AsyncWritePoll;
27
27
 
28
28
  let wait_errno = 'wait: {
29
29
  let Ok(raw) = c_int::try_from(fd) else {