rloop 0.1.0__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.
- rloop-0.1.0/Cargo.lock +392 -0
- rloop-0.1.0/Cargo.toml +52 -0
- rloop-0.1.0/LICENSE +28 -0
- rloop-0.1.0/PKG-INFO +89 -0
- rloop-0.1.0/README.md +50 -0
- rloop-0.1.0/pyproject.toml +100 -0
- rloop-0.1.0/rloop/__init__.py +13 -0
- rloop-0.1.0/rloop/_compat.py +5 -0
- rloop-0.1.0/rloop/_rloop.pyi +64 -0
- rloop-0.1.0/rloop/exc.py +76 -0
- rloop-0.1.0/rloop/futures.py +25 -0
- rloop-0.1.0/rloop/loop.py +1076 -0
- rloop-0.1.0/rloop/server.py +87 -0
- rloop-0.1.0/rloop/subprocess.py +367 -0
- rloop-0.1.0/rloop/transports.py +72 -0
- rloop-0.1.0/rloop/utils.py +107 -0
- rloop-0.1.0/src/event_loop.rs +1158 -0
- rloop-0.1.0/src/handles.rs +206 -0
- rloop-0.1.0/src/io.rs +78 -0
- rloop-0.1.0/src/lib.rs +33 -0
- rloop-0.1.0/src/log.rs +63 -0
- rloop-0.1.0/src/py.rs +94 -0
- rloop-0.1.0/src/server.rs +116 -0
- rloop-0.1.0/src/sock.rs +74 -0
- rloop-0.1.0/src/tcp.rs +726 -0
- rloop-0.1.0/src/time.rs +34 -0
- rloop-0.1.0/src/utils.rs +27 -0
- rloop-0.1.0/tests/conftest.py +8 -0
- rloop-0.1.0/tests/tcp/__init__.py +35 -0
- rloop-0.1.0/tests/tcp/test_tcp_conn.py +45 -0
- rloop-0.1.0/tests/tcp/test_tcp_server.py +80 -0
- rloop-0.1.0/tests/test_handles.py +59 -0
- rloop-0.1.0/tests/test_sockets.py +70 -0
- rloop-0.1.0/tests/udp/test_udp.py +76 -0
rloop-0.1.0/Cargo.lock
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "anyhow"
|
|
7
|
+
version = "1.0.95"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "autocfg"
|
|
13
|
+
version = "1.4.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "bitflags"
|
|
19
|
+
version = "2.8.0"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "cc"
|
|
25
|
+
version = "1.2.14"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"shlex",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "cfg-if"
|
|
34
|
+
version = "1.0.0"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
37
|
+
|
|
38
|
+
[[package]]
|
|
39
|
+
name = "crossbeam-utils"
|
|
40
|
+
version = "0.8.21"
|
|
41
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "dashmap"
|
|
46
|
+
version = "6.1.0"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
|
|
49
|
+
dependencies = [
|
|
50
|
+
"cfg-if",
|
|
51
|
+
"crossbeam-utils",
|
|
52
|
+
"hashbrown",
|
|
53
|
+
"lock_api",
|
|
54
|
+
"once_cell",
|
|
55
|
+
"parking_lot_core",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[[package]]
|
|
59
|
+
name = "hashbrown"
|
|
60
|
+
version = "0.14.5"
|
|
61
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
62
|
+
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
|
63
|
+
|
|
64
|
+
[[package]]
|
|
65
|
+
name = "heck"
|
|
66
|
+
version = "0.5.0"
|
|
67
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "indoc"
|
|
72
|
+
version = "2.0.5"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "libc"
|
|
78
|
+
version = "0.2.169"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
|
81
|
+
|
|
82
|
+
[[package]]
|
|
83
|
+
name = "lock_api"
|
|
84
|
+
version = "0.4.12"
|
|
85
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
86
|
+
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
|
87
|
+
dependencies = [
|
|
88
|
+
"autocfg",
|
|
89
|
+
"scopeguard",
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
[[package]]
|
|
93
|
+
name = "log"
|
|
94
|
+
version = "0.4.25"
|
|
95
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
96
|
+
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
|
|
97
|
+
|
|
98
|
+
[[package]]
|
|
99
|
+
name = "memoffset"
|
|
100
|
+
version = "0.9.1"
|
|
101
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
102
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
103
|
+
dependencies = [
|
|
104
|
+
"autocfg",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "mio"
|
|
109
|
+
version = "1.0.3"
|
|
110
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
+
checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
|
|
112
|
+
dependencies = [
|
|
113
|
+
"libc",
|
|
114
|
+
"log",
|
|
115
|
+
"wasi",
|
|
116
|
+
"windows-sys",
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
[[package]]
|
|
120
|
+
name = "once_cell"
|
|
121
|
+
version = "1.20.3"
|
|
122
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
+
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
|
124
|
+
|
|
125
|
+
[[package]]
|
|
126
|
+
name = "parking_lot_core"
|
|
127
|
+
version = "0.9.10"
|
|
128
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
+
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
|
130
|
+
dependencies = [
|
|
131
|
+
"cfg-if",
|
|
132
|
+
"libc",
|
|
133
|
+
"redox_syscall",
|
|
134
|
+
"smallvec",
|
|
135
|
+
"windows-targets",
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
[[package]]
|
|
139
|
+
name = "portable-atomic"
|
|
140
|
+
version = "1.10.0"
|
|
141
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
142
|
+
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
|
|
143
|
+
|
|
144
|
+
[[package]]
|
|
145
|
+
name = "proc-macro2"
|
|
146
|
+
version = "1.0.93"
|
|
147
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
148
|
+
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
|
149
|
+
dependencies = [
|
|
150
|
+
"unicode-ident",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "pyo3"
|
|
155
|
+
version = "0.23.4"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"anyhow",
|
|
160
|
+
"cfg-if",
|
|
161
|
+
"indoc",
|
|
162
|
+
"libc",
|
|
163
|
+
"memoffset",
|
|
164
|
+
"once_cell",
|
|
165
|
+
"portable-atomic",
|
|
166
|
+
"pyo3-build-config",
|
|
167
|
+
"pyo3-ffi",
|
|
168
|
+
"pyo3-macros",
|
|
169
|
+
"unindent",
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
[[package]]
|
|
173
|
+
name = "pyo3-build-config"
|
|
174
|
+
version = "0.23.4"
|
|
175
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
176
|
+
checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7"
|
|
177
|
+
dependencies = [
|
|
178
|
+
"once_cell",
|
|
179
|
+
"python3-dll-a",
|
|
180
|
+
"target-lexicon",
|
|
181
|
+
]
|
|
182
|
+
|
|
183
|
+
[[package]]
|
|
184
|
+
name = "pyo3-ffi"
|
|
185
|
+
version = "0.23.4"
|
|
186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
+
checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d"
|
|
188
|
+
dependencies = [
|
|
189
|
+
"libc",
|
|
190
|
+
"pyo3-build-config",
|
|
191
|
+
]
|
|
192
|
+
|
|
193
|
+
[[package]]
|
|
194
|
+
name = "pyo3-macros"
|
|
195
|
+
version = "0.23.4"
|
|
196
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
197
|
+
checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7"
|
|
198
|
+
dependencies = [
|
|
199
|
+
"proc-macro2",
|
|
200
|
+
"pyo3-macros-backend",
|
|
201
|
+
"quote",
|
|
202
|
+
"syn",
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
[[package]]
|
|
206
|
+
name = "pyo3-macros-backend"
|
|
207
|
+
version = "0.23.4"
|
|
208
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
209
|
+
checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4"
|
|
210
|
+
dependencies = [
|
|
211
|
+
"heck",
|
|
212
|
+
"proc-macro2",
|
|
213
|
+
"pyo3-build-config",
|
|
214
|
+
"quote",
|
|
215
|
+
"syn",
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
[[package]]
|
|
219
|
+
name = "python3-dll-a"
|
|
220
|
+
version = "0.2.13"
|
|
221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
+
checksum = "49fe4227a288cf9493942ad0220ea3f185f4d1f2a14f197f7344d6d02f4ed4ed"
|
|
223
|
+
dependencies = [
|
|
224
|
+
"cc",
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
[[package]]
|
|
228
|
+
name = "quote"
|
|
229
|
+
version = "1.0.38"
|
|
230
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
+
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
|
232
|
+
dependencies = [
|
|
233
|
+
"proc-macro2",
|
|
234
|
+
]
|
|
235
|
+
|
|
236
|
+
[[package]]
|
|
237
|
+
name = "redox_syscall"
|
|
238
|
+
version = "0.5.8"
|
|
239
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
+
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
|
241
|
+
dependencies = [
|
|
242
|
+
"bitflags",
|
|
243
|
+
]
|
|
244
|
+
|
|
245
|
+
[[package]]
|
|
246
|
+
name = "rloop"
|
|
247
|
+
version = "0.1.0"
|
|
248
|
+
dependencies = [
|
|
249
|
+
"anyhow",
|
|
250
|
+
"dashmap",
|
|
251
|
+
"libc",
|
|
252
|
+
"mio",
|
|
253
|
+
"pyo3",
|
|
254
|
+
"pyo3-build-config",
|
|
255
|
+
"socket2",
|
|
256
|
+
]
|
|
257
|
+
|
|
258
|
+
[[package]]
|
|
259
|
+
name = "scopeguard"
|
|
260
|
+
version = "1.2.0"
|
|
261
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
263
|
+
|
|
264
|
+
[[package]]
|
|
265
|
+
name = "shlex"
|
|
266
|
+
version = "1.3.0"
|
|
267
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
268
|
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
269
|
+
|
|
270
|
+
[[package]]
|
|
271
|
+
name = "smallvec"
|
|
272
|
+
version = "1.14.0"
|
|
273
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
+
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
|
275
|
+
|
|
276
|
+
[[package]]
|
|
277
|
+
name = "socket2"
|
|
278
|
+
version = "0.5.8"
|
|
279
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
+
checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
|
|
281
|
+
dependencies = [
|
|
282
|
+
"libc",
|
|
283
|
+
"windows-sys",
|
|
284
|
+
]
|
|
285
|
+
|
|
286
|
+
[[package]]
|
|
287
|
+
name = "syn"
|
|
288
|
+
version = "2.0.98"
|
|
289
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
290
|
+
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
|
|
291
|
+
dependencies = [
|
|
292
|
+
"proc-macro2",
|
|
293
|
+
"quote",
|
|
294
|
+
"unicode-ident",
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
[[package]]
|
|
298
|
+
name = "target-lexicon"
|
|
299
|
+
version = "0.12.16"
|
|
300
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
301
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
302
|
+
|
|
303
|
+
[[package]]
|
|
304
|
+
name = "unicode-ident"
|
|
305
|
+
version = "1.0.16"
|
|
306
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
307
|
+
checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
|
|
308
|
+
|
|
309
|
+
[[package]]
|
|
310
|
+
name = "unindent"
|
|
311
|
+
version = "0.2.3"
|
|
312
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
313
|
+
checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
314
|
+
|
|
315
|
+
[[package]]
|
|
316
|
+
name = "wasi"
|
|
317
|
+
version = "0.11.0+wasi-snapshot-preview1"
|
|
318
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
320
|
+
|
|
321
|
+
[[package]]
|
|
322
|
+
name = "windows-sys"
|
|
323
|
+
version = "0.52.0"
|
|
324
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
|
+
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
|
326
|
+
dependencies = [
|
|
327
|
+
"windows-targets",
|
|
328
|
+
]
|
|
329
|
+
|
|
330
|
+
[[package]]
|
|
331
|
+
name = "windows-targets"
|
|
332
|
+
version = "0.52.6"
|
|
333
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
334
|
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
335
|
+
dependencies = [
|
|
336
|
+
"windows_aarch64_gnullvm",
|
|
337
|
+
"windows_aarch64_msvc",
|
|
338
|
+
"windows_i686_gnu",
|
|
339
|
+
"windows_i686_gnullvm",
|
|
340
|
+
"windows_i686_msvc",
|
|
341
|
+
"windows_x86_64_gnu",
|
|
342
|
+
"windows_x86_64_gnullvm",
|
|
343
|
+
"windows_x86_64_msvc",
|
|
344
|
+
]
|
|
345
|
+
|
|
346
|
+
[[package]]
|
|
347
|
+
name = "windows_aarch64_gnullvm"
|
|
348
|
+
version = "0.52.6"
|
|
349
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
350
|
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
351
|
+
|
|
352
|
+
[[package]]
|
|
353
|
+
name = "windows_aarch64_msvc"
|
|
354
|
+
version = "0.52.6"
|
|
355
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
356
|
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
357
|
+
|
|
358
|
+
[[package]]
|
|
359
|
+
name = "windows_i686_gnu"
|
|
360
|
+
version = "0.52.6"
|
|
361
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
362
|
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
363
|
+
|
|
364
|
+
[[package]]
|
|
365
|
+
name = "windows_i686_gnullvm"
|
|
366
|
+
version = "0.52.6"
|
|
367
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
368
|
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
369
|
+
|
|
370
|
+
[[package]]
|
|
371
|
+
name = "windows_i686_msvc"
|
|
372
|
+
version = "0.52.6"
|
|
373
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
374
|
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
375
|
+
|
|
376
|
+
[[package]]
|
|
377
|
+
name = "windows_x86_64_gnu"
|
|
378
|
+
version = "0.52.6"
|
|
379
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
381
|
+
|
|
382
|
+
[[package]]
|
|
383
|
+
name = "windows_x86_64_gnullvm"
|
|
384
|
+
version = "0.52.6"
|
|
385
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
386
|
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
387
|
+
|
|
388
|
+
[[package]]
|
|
389
|
+
name = "windows_x86_64_msvc"
|
|
390
|
+
version = "0.52.6"
|
|
391
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
392
|
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
rloop-0.1.0/Cargo.toml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "rloop"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "An asyncio event loop implemented in Rust"
|
|
5
|
+
authors = ["Giovanni Barillari <g@baro.dev>"]
|
|
6
|
+
license = "BSD-3-Clause"
|
|
7
|
+
edition = "2021"
|
|
8
|
+
|
|
9
|
+
keywords = ["asyncio"]
|
|
10
|
+
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
homepage = "https://github.com/gi0baro/rloop"
|
|
13
|
+
repository = "https://github.com/gi0baro/rloop"
|
|
14
|
+
|
|
15
|
+
include = [
|
|
16
|
+
"/Cargo.toml",
|
|
17
|
+
"/pyproject.toml",
|
|
18
|
+
"/LICENSE",
|
|
19
|
+
"/README.md",
|
|
20
|
+
"/src",
|
|
21
|
+
"/rloop",
|
|
22
|
+
"/tests",
|
|
23
|
+
"!__pycache__",
|
|
24
|
+
"!tests/.pytest_cache",
|
|
25
|
+
"!*.so",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[lib]
|
|
29
|
+
name = "_rloop"
|
|
30
|
+
crate-type = ["cdylib"]
|
|
31
|
+
|
|
32
|
+
[dependencies]
|
|
33
|
+
anyhow = "=1.0"
|
|
34
|
+
dashmap = { version = "=6.1", features = ["inline"] }
|
|
35
|
+
mio = { version = "=1.0", features = ["net", "os-ext", "os-poll"] }
|
|
36
|
+
pyo3 = { version = "=0.23", features = ["anyhow", "extension-module", "generate-import-lib"] }
|
|
37
|
+
socket2 = { version = "=0.5", features = ["all"] }
|
|
38
|
+
|
|
39
|
+
[target.'cfg(unix)'.dependencies]
|
|
40
|
+
libc = "0.2.159"
|
|
41
|
+
|
|
42
|
+
[build-dependencies]
|
|
43
|
+
pyo3-build-config = "=0.23"
|
|
44
|
+
|
|
45
|
+
[profile.release]
|
|
46
|
+
codegen-units = 1
|
|
47
|
+
debug = false
|
|
48
|
+
incremental = false
|
|
49
|
+
lto = "fat"
|
|
50
|
+
opt-level = 3
|
|
51
|
+
panic = "abort"
|
|
52
|
+
strip = true
|
rloop-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright 2024 Giovanni Barillari
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
15
|
+
contributors may be used to endorse or promote products derived from
|
|
16
|
+
this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
21
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
24
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
25
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
26
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
27
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
28
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
rloop-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rloop
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
7
|
+
Classifier: Operating System :: MacOS
|
|
8
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Rust
|
|
19
|
+
Requires-Dist: ruff~=0.5.0 ; extra == 'lint'
|
|
20
|
+
Requires-Dist: pytest~=7.4.2 ; extra == 'test'
|
|
21
|
+
Requires-Dist: pytest-asyncio~=0.21.1 ; extra == 'test'
|
|
22
|
+
Requires-Dist: rloop[lint,test] ; extra == 'dev'
|
|
23
|
+
Provides-Extra: lint
|
|
24
|
+
Provides-Extra: test
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Summary: An asyncio event loop implemented in Rust
|
|
28
|
+
Keywords: asyncio
|
|
29
|
+
Home-Page: https://github.com/gi0baro/rloop
|
|
30
|
+
Author: Giovanni Barillari <g@baro.dev>
|
|
31
|
+
Author-email: Giovanni Barillari <g@baro.dev>
|
|
32
|
+
License: BSD-3-Clause
|
|
33
|
+
Requires-Python: >=3.9
|
|
34
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
|
+
Project-URL: Homepage, https://github.com/gi0baro/rloop
|
|
36
|
+
Project-URL: Funding, https://github.com/sponsors/gi0baro
|
|
37
|
+
Project-URL: Source, https://github.com/gi0baro/rloop
|
|
38
|
+
|
|
39
|
+
# RLoop
|
|
40
|
+
|
|
41
|
+
RLoop is an [AsyncIO](https://docs.python.org/3/library/asyncio.html) selector event loop implemented in Rust on top of the [mio crate](https://github.com/tokio-rs/mio).
|
|
42
|
+
|
|
43
|
+
> **Warning**: RLoop is currently a work in progress and definitely not suited for *production usage*.
|
|
44
|
+
|
|
45
|
+
> **Note:** RLoop is available on Unix systems only.
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install rloop
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import asyncio
|
|
57
|
+
import rloop
|
|
58
|
+
|
|
59
|
+
asyncio.set_event_loop_policy(rloop.EventLoopPolicy())
|
|
60
|
+
loop = asyncio.new_event_loop()
|
|
61
|
+
asyncio.set_event_loop(loop)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Differences from stdlib
|
|
65
|
+
|
|
66
|
+
At current time, when compared with the stdlib's event loop, RLoop doesn't support the following features:
|
|
67
|
+
|
|
68
|
+
- UDP
|
|
69
|
+
- Unix Domain Sockets
|
|
70
|
+
- SSL
|
|
71
|
+
- debugging
|
|
72
|
+
|
|
73
|
+
RLoop also doesn't implement the following methods:
|
|
74
|
+
|
|
75
|
+
- `loop.sendfile`
|
|
76
|
+
- `loop.connect_accepted_socket`
|
|
77
|
+
- `loop.sock_recvfrom`
|
|
78
|
+
- `loop.sock_recvfrom_into`
|
|
79
|
+
- `loop.sock_sendto`
|
|
80
|
+
- `loop.sock_sendfile`
|
|
81
|
+
|
|
82
|
+
### `call_later` with negative delays
|
|
83
|
+
|
|
84
|
+
While the stdlib's event loop will use the actual delay of callbacks when `call_later` is used with negative numbers, RLoop will treat those as `call_soon`, and thus the effective order will follow the invocation order, not the delay.
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
RLoop is released under the BSD License.
|
|
89
|
+
|
rloop-0.1.0/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# RLoop
|
|
2
|
+
|
|
3
|
+
RLoop is an [AsyncIO](https://docs.python.org/3/library/asyncio.html) selector event loop implemented in Rust on top of the [mio crate](https://github.com/tokio-rs/mio).
|
|
4
|
+
|
|
5
|
+
> **Warning**: RLoop is currently a work in progress and definitely not suited for *production usage*.
|
|
6
|
+
|
|
7
|
+
> **Note:** RLoop is available on Unix systems only.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install rloop
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import asyncio
|
|
19
|
+
import rloop
|
|
20
|
+
|
|
21
|
+
asyncio.set_event_loop_policy(rloop.EventLoopPolicy())
|
|
22
|
+
loop = asyncio.new_event_loop()
|
|
23
|
+
asyncio.set_event_loop(loop)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Differences from stdlib
|
|
27
|
+
|
|
28
|
+
At current time, when compared with the stdlib's event loop, RLoop doesn't support the following features:
|
|
29
|
+
|
|
30
|
+
- UDP
|
|
31
|
+
- Unix Domain Sockets
|
|
32
|
+
- SSL
|
|
33
|
+
- debugging
|
|
34
|
+
|
|
35
|
+
RLoop also doesn't implement the following methods:
|
|
36
|
+
|
|
37
|
+
- `loop.sendfile`
|
|
38
|
+
- `loop.connect_accepted_socket`
|
|
39
|
+
- `loop.sock_recvfrom`
|
|
40
|
+
- `loop.sock_recvfrom_into`
|
|
41
|
+
- `loop.sock_sendto`
|
|
42
|
+
- `loop.sock_sendfile`
|
|
43
|
+
|
|
44
|
+
### `call_later` with negative delays
|
|
45
|
+
|
|
46
|
+
While the stdlib's event loop will use the actual delay of callbacks when `call_later` is used with negative numbers, RLoop will treat those as `call_soon`, and thus the effective order will follow the invocation order, not the delay.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
RLoop is released under the BSD License.
|