tonio 0.1.0a1__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.
- tonio-0.1.0a1/Cargo.lock +381 -0
- tonio-0.1.0a1/Cargo.toml +50 -0
- tonio-0.1.0a1/LICENSE +28 -0
- tonio-0.1.0a1/PKG-INFO +55 -0
- tonio-0.1.0a1/README.md +28 -0
- tonio-0.1.0a1/pyproject.toml +100 -0
- tonio-0.1.0a1/src/blocking.rs +130 -0
- tonio-0.1.0a1/src/errors.rs +37 -0
- tonio-0.1.0a1/src/events.rs +504 -0
- tonio-0.1.0a1/src/handles.rs +245 -0
- tonio-0.1.0a1/src/io.rs +67 -0
- tonio-0.1.0a1/src/lib.rs +53 -0
- tonio-0.1.0a1/src/net/mod.rs +9 -0
- tonio-0.1.0a1/src/net/socket.rs +50 -0
- tonio-0.1.0a1/src/py.rs +58 -0
- tonio-0.1.0a1/src/runtime.rs +661 -0
- tonio-0.1.0a1/src/sync.rs +426 -0
- tonio-0.1.0a1/src/time.rs +47 -0
- tonio-0.1.0a1/tests/conftest.py +21 -0
- tonio-0.1.0a1/tests/net/test_socket.py +69 -0
- tonio-0.1.0a1/tests/test_sync.py +135 -0
- tonio-0.1.0a1/tests/test_time.py +30 -0
- tonio-0.1.0a1/tonio/__init__.py +4 -0
- tonio-0.1.0a1/tonio/_ctl.py +38 -0
- tonio-0.1.0a1/tonio/_deco.py +34 -0
- tonio-0.1.0a1/tonio/_events.py +11 -0
- tonio-0.1.0a1/tonio/_net/__init__.py +0 -0
- tonio-0.1.0a1/tonio/_net/_socket.py +383 -0
- tonio-0.1.0a1/tonio/_runtime.py +80 -0
- tonio-0.1.0a1/tonio/_sync.py +86 -0
- tonio-0.1.0a1/tonio/_time.py +36 -0
- tonio-0.1.0a1/tonio/_tonio.pyi +101 -0
- tonio-0.1.0a1/tonio/_types.py +6 -0
- tonio-0.1.0a1/tonio/_utils.py +5 -0
- tonio-0.1.0a1/tonio/exceptions.py +7 -0
- tonio-0.1.0a1/tonio/net/__init__.py +0 -0
- tonio-0.1.0a1/tonio/net/socket.py +4 -0
- tonio-0.1.0a1/tonio/sync/__init__.py +1 -0
- tonio-0.1.0a1/tonio/sync/channel/__init__.py +4 -0
tonio-0.1.0a1/Cargo.lock
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
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.100"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "autocfg"
|
|
13
|
+
version = "1.5.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "cc"
|
|
19
|
+
version = "1.2.49"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215"
|
|
22
|
+
dependencies = [
|
|
23
|
+
"find-msvc-tools",
|
|
24
|
+
"shlex",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[[package]]
|
|
28
|
+
name = "crossbeam-channel"
|
|
29
|
+
version = "0.5.15"
|
|
30
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
31
|
+
checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
|
|
32
|
+
dependencies = [
|
|
33
|
+
"crossbeam-utils",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "crossbeam-utils"
|
|
38
|
+
version = "0.8.21"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
41
|
+
|
|
42
|
+
[[package]]
|
|
43
|
+
name = "equivalent"
|
|
44
|
+
version = "1.0.2"
|
|
45
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
46
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "find-msvc-tools"
|
|
50
|
+
version = "0.1.5"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
|
|
53
|
+
|
|
54
|
+
[[package]]
|
|
55
|
+
name = "heck"
|
|
56
|
+
version = "0.5.0"
|
|
57
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
58
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
59
|
+
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "indoc"
|
|
62
|
+
version = "2.0.7"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
65
|
+
dependencies = [
|
|
66
|
+
"rustversion",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "libc"
|
|
71
|
+
version = "0.2.178"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
|
|
74
|
+
|
|
75
|
+
[[package]]
|
|
76
|
+
name = "log"
|
|
77
|
+
version = "0.4.29"
|
|
78
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
80
|
+
|
|
81
|
+
[[package]]
|
|
82
|
+
name = "memoffset"
|
|
83
|
+
version = "0.9.1"
|
|
84
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
86
|
+
dependencies = [
|
|
87
|
+
"autocfg",
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "mio"
|
|
92
|
+
version = "1.1.1"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
|
|
95
|
+
dependencies = [
|
|
96
|
+
"libc",
|
|
97
|
+
"log",
|
|
98
|
+
"wasi",
|
|
99
|
+
"windows-sys 0.61.2",
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
[[package]]
|
|
103
|
+
name = "once_cell"
|
|
104
|
+
version = "1.21.3"
|
|
105
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
107
|
+
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "papaya"
|
|
110
|
+
version = "0.2.3"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "f92dd0b07c53a0a0c764db2ace8c541dc47320dad97c2200c2a637ab9dd2328f"
|
|
113
|
+
dependencies = [
|
|
114
|
+
"equivalent",
|
|
115
|
+
"seize",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
[[package]]
|
|
119
|
+
name = "portable-atomic"
|
|
120
|
+
version = "1.11.1"
|
|
121
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
|
123
|
+
|
|
124
|
+
[[package]]
|
|
125
|
+
name = "proc-macro2"
|
|
126
|
+
version = "1.0.103"
|
|
127
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
128
|
+
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
|
|
129
|
+
dependencies = [
|
|
130
|
+
"unicode-ident",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "pyo3"
|
|
135
|
+
version = "0.27.2"
|
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
+
checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
|
|
138
|
+
dependencies = [
|
|
139
|
+
"anyhow",
|
|
140
|
+
"indoc",
|
|
141
|
+
"libc",
|
|
142
|
+
"memoffset",
|
|
143
|
+
"once_cell",
|
|
144
|
+
"portable-atomic",
|
|
145
|
+
"pyo3-build-config",
|
|
146
|
+
"pyo3-ffi",
|
|
147
|
+
"pyo3-macros",
|
|
148
|
+
"unindent",
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
[[package]]
|
|
152
|
+
name = "pyo3-build-config"
|
|
153
|
+
version = "0.27.2"
|
|
154
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
155
|
+
checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
|
|
156
|
+
dependencies = [
|
|
157
|
+
"python3-dll-a",
|
|
158
|
+
"target-lexicon",
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
[[package]]
|
|
162
|
+
name = "pyo3-ffi"
|
|
163
|
+
version = "0.27.2"
|
|
164
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
+
checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
|
|
166
|
+
dependencies = [
|
|
167
|
+
"libc",
|
|
168
|
+
"pyo3-build-config",
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
[[package]]
|
|
172
|
+
name = "pyo3-macros"
|
|
173
|
+
version = "0.27.2"
|
|
174
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
175
|
+
checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
|
|
176
|
+
dependencies = [
|
|
177
|
+
"proc-macro2",
|
|
178
|
+
"pyo3-macros-backend",
|
|
179
|
+
"quote",
|
|
180
|
+
"syn",
|
|
181
|
+
]
|
|
182
|
+
|
|
183
|
+
[[package]]
|
|
184
|
+
name = "pyo3-macros-backend"
|
|
185
|
+
version = "0.27.2"
|
|
186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
+
checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
|
|
188
|
+
dependencies = [
|
|
189
|
+
"heck",
|
|
190
|
+
"proc-macro2",
|
|
191
|
+
"pyo3-build-config",
|
|
192
|
+
"quote",
|
|
193
|
+
"syn",
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
[[package]]
|
|
197
|
+
name = "python3-dll-a"
|
|
198
|
+
version = "0.2.14"
|
|
199
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
+
checksum = "d381ef313ae70b4da5f95f8a4de773c6aa5cd28f73adec4b4a31df70b66780d8"
|
|
201
|
+
dependencies = [
|
|
202
|
+
"cc",
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
[[package]]
|
|
206
|
+
name = "quote"
|
|
207
|
+
version = "1.0.42"
|
|
208
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
209
|
+
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
|
|
210
|
+
dependencies = [
|
|
211
|
+
"proc-macro2",
|
|
212
|
+
]
|
|
213
|
+
|
|
214
|
+
[[package]]
|
|
215
|
+
name = "rustversion"
|
|
216
|
+
version = "1.0.22"
|
|
217
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
218
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
219
|
+
|
|
220
|
+
[[package]]
|
|
221
|
+
name = "seize"
|
|
222
|
+
version = "0.5.1"
|
|
223
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
224
|
+
checksum = "5b55fb86dfd3a2f5f76ea78310a88f96c4ea21a3031f8d212443d56123fd0521"
|
|
225
|
+
dependencies = [
|
|
226
|
+
"libc",
|
|
227
|
+
"windows-sys 0.61.2",
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
[[package]]
|
|
231
|
+
name = "shlex"
|
|
232
|
+
version = "1.3.0"
|
|
233
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
235
|
+
|
|
236
|
+
[[package]]
|
|
237
|
+
name = "socket2"
|
|
238
|
+
version = "0.6.1"
|
|
239
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
+
checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
|
|
241
|
+
dependencies = [
|
|
242
|
+
"libc",
|
|
243
|
+
"windows-sys 0.60.2",
|
|
244
|
+
]
|
|
245
|
+
|
|
246
|
+
[[package]]
|
|
247
|
+
name = "syn"
|
|
248
|
+
version = "2.0.111"
|
|
249
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
250
|
+
checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
|
|
251
|
+
dependencies = [
|
|
252
|
+
"proc-macro2",
|
|
253
|
+
"quote",
|
|
254
|
+
"unicode-ident",
|
|
255
|
+
]
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "target-lexicon"
|
|
259
|
+
version = "0.13.3"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "tonio"
|
|
265
|
+
version = "0.1.0-alpha1"
|
|
266
|
+
dependencies = [
|
|
267
|
+
"anyhow",
|
|
268
|
+
"crossbeam-channel",
|
|
269
|
+
"libc",
|
|
270
|
+
"mio",
|
|
271
|
+
"papaya",
|
|
272
|
+
"pyo3",
|
|
273
|
+
"socket2",
|
|
274
|
+
]
|
|
275
|
+
|
|
276
|
+
[[package]]
|
|
277
|
+
name = "unicode-ident"
|
|
278
|
+
version = "1.0.22"
|
|
279
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
+
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
|
281
|
+
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "unindent"
|
|
284
|
+
version = "0.2.4"
|
|
285
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
287
|
+
|
|
288
|
+
[[package]]
|
|
289
|
+
name = "wasi"
|
|
290
|
+
version = "0.11.1+wasi-snapshot-preview1"
|
|
291
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "windows-link"
|
|
296
|
+
version = "0.2.1"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
299
|
+
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "windows-sys"
|
|
302
|
+
version = "0.60.2"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
|
305
|
+
dependencies = [
|
|
306
|
+
"windows-targets",
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
[[package]]
|
|
310
|
+
name = "windows-sys"
|
|
311
|
+
version = "0.61.2"
|
|
312
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
313
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
314
|
+
dependencies = [
|
|
315
|
+
"windows-link",
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
[[package]]
|
|
319
|
+
name = "windows-targets"
|
|
320
|
+
version = "0.53.5"
|
|
321
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
|
+
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
|
|
323
|
+
dependencies = [
|
|
324
|
+
"windows-link",
|
|
325
|
+
"windows_aarch64_gnullvm",
|
|
326
|
+
"windows_aarch64_msvc",
|
|
327
|
+
"windows_i686_gnu",
|
|
328
|
+
"windows_i686_gnullvm",
|
|
329
|
+
"windows_i686_msvc",
|
|
330
|
+
"windows_x86_64_gnu",
|
|
331
|
+
"windows_x86_64_gnullvm",
|
|
332
|
+
"windows_x86_64_msvc",
|
|
333
|
+
]
|
|
334
|
+
|
|
335
|
+
[[package]]
|
|
336
|
+
name = "windows_aarch64_gnullvm"
|
|
337
|
+
version = "0.53.1"
|
|
338
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
339
|
+
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
|
340
|
+
|
|
341
|
+
[[package]]
|
|
342
|
+
name = "windows_aarch64_msvc"
|
|
343
|
+
version = "0.53.1"
|
|
344
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
345
|
+
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
|
346
|
+
|
|
347
|
+
[[package]]
|
|
348
|
+
name = "windows_i686_gnu"
|
|
349
|
+
version = "0.53.1"
|
|
350
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
351
|
+
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
|
|
352
|
+
|
|
353
|
+
[[package]]
|
|
354
|
+
name = "windows_i686_gnullvm"
|
|
355
|
+
version = "0.53.1"
|
|
356
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
+
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
|
358
|
+
|
|
359
|
+
[[package]]
|
|
360
|
+
name = "windows_i686_msvc"
|
|
361
|
+
version = "0.53.1"
|
|
362
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
363
|
+
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
|
364
|
+
|
|
365
|
+
[[package]]
|
|
366
|
+
name = "windows_x86_64_gnu"
|
|
367
|
+
version = "0.53.1"
|
|
368
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
369
|
+
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
|
370
|
+
|
|
371
|
+
[[package]]
|
|
372
|
+
name = "windows_x86_64_gnullvm"
|
|
373
|
+
version = "0.53.1"
|
|
374
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
375
|
+
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
|
376
|
+
|
|
377
|
+
[[package]]
|
|
378
|
+
name = "windows_x86_64_msvc"
|
|
379
|
+
version = "0.53.1"
|
|
380
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
381
|
+
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
tonio-0.1.0a1/Cargo.toml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "tonio"
|
|
3
|
+
version = "0.1.0-alpha1"
|
|
4
|
+
description = "A multi-threaded async runtime"
|
|
5
|
+
authors = ["Giovanni Barillari <g@baro.dev>"]
|
|
6
|
+
license = "BSD-3-Clause"
|
|
7
|
+
edition = "2024"
|
|
8
|
+
|
|
9
|
+
keywords = ["async", "io", "threading", "networking"]
|
|
10
|
+
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
homepage = "https://github.com/gi0baro/tonio"
|
|
13
|
+
repository = "https://github.com/gi0baro/tonio"
|
|
14
|
+
|
|
15
|
+
include = [
|
|
16
|
+
"/Cargo.toml",
|
|
17
|
+
"/pyproject.toml",
|
|
18
|
+
"/LICENSE",
|
|
19
|
+
"/README.md",
|
|
20
|
+
"/src",
|
|
21
|
+
"/tonio",
|
|
22
|
+
"/tests",
|
|
23
|
+
"!__pycache__",
|
|
24
|
+
"!tests/.pytest_cache",
|
|
25
|
+
"!*.so",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[lib]
|
|
29
|
+
name = "_tonio"
|
|
30
|
+
crate-type = ["cdylib", "rlib"]
|
|
31
|
+
|
|
32
|
+
[dependencies]
|
|
33
|
+
anyhow = "=1.0"
|
|
34
|
+
crossbeam-channel = "0.5"
|
|
35
|
+
mio = { version = "=1.1", features = ["net", "os-ext", "os-poll"] }
|
|
36
|
+
papaya = "=0.2"
|
|
37
|
+
pyo3 = { version = "=0.27", features = ["anyhow", "extension-module", "generate-import-lib"] }
|
|
38
|
+
socket2 = { version = "=0.6", features = ["all"] }
|
|
39
|
+
|
|
40
|
+
[target.'cfg(unix)'.dependencies]
|
|
41
|
+
libc = "0.2.159"
|
|
42
|
+
|
|
43
|
+
[profile.release]
|
|
44
|
+
codegen-units = 1
|
|
45
|
+
debug = false
|
|
46
|
+
incremental = false
|
|
47
|
+
lto = "fat"
|
|
48
|
+
opt-level = 3
|
|
49
|
+
panic = "abort"
|
|
50
|
+
strip = true
|
tonio-0.1.0a1/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright 2025 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.
|
tonio-0.1.0a1/PKG-INFO
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tonio
|
|
3
|
+
Version: 0.1.0a1
|
|
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 :: Free Threading :: 2 - Beta
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Rust
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Summary: A multi-threaded async runtime
|
|
17
|
+
Keywords: async,io,threading,networking
|
|
18
|
+
Home-Page: https://github.com/gi0baro/tonio
|
|
19
|
+
Author-email: Giovanni Barillari <g@baro.dev>
|
|
20
|
+
License: BSD-3-Clause
|
|
21
|
+
Requires-Python: >=3.14
|
|
22
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
23
|
+
Project-URL: Homepage, https://github.com/gi0baro/tonio
|
|
24
|
+
Project-URL: Funding, https://github.com/sponsors/gi0baro
|
|
25
|
+
Project-URL: Source, https://github.com/gi0baro/tonio
|
|
26
|
+
|
|
27
|
+
# TonIO
|
|
28
|
+
|
|
29
|
+
TonIO is a multi-threaded async runtime for free-threaded Python, built in Rust on top of the [mio crate](https://github.com/tokio-rs/mio), and inspired by [tinyio](https://github.com/patrick-kidger/tinyio) and [trio](https://github.com/python-trio/trio).
|
|
30
|
+
|
|
31
|
+
> **Warning**: TonIO is currently a work in progress and very pre-alpha state. The APIs are subtle to breaking changes.
|
|
32
|
+
|
|
33
|
+
> **Note:** TonIO is available on free-threaded Python and on Unix systems only.
|
|
34
|
+
|
|
35
|
+
## In a nutshell
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import tonio
|
|
39
|
+
|
|
40
|
+
def wait_and_add(x: int) -> int:
|
|
41
|
+
yield tonio.sleep(1)
|
|
42
|
+
return x + 1
|
|
43
|
+
|
|
44
|
+
def foo():
|
|
45
|
+
four, five = yield tonio.spawn(wait_and_add(3), wait_and_add(4))
|
|
46
|
+
return four, five
|
|
47
|
+
|
|
48
|
+
out = tonio.run(foo())
|
|
49
|
+
assert out == (4, 5)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
TonIO is released under the BSD License.
|
|
55
|
+
|
tonio-0.1.0a1/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# TonIO
|
|
2
|
+
|
|
3
|
+
TonIO is a multi-threaded async runtime for free-threaded Python, built in Rust on top of the [mio crate](https://github.com/tokio-rs/mio), and inspired by [tinyio](https://github.com/patrick-kidger/tinyio) and [trio](https://github.com/python-trio/trio).
|
|
4
|
+
|
|
5
|
+
> **Warning**: TonIO is currently a work in progress and very pre-alpha state. The APIs are subtle to breaking changes.
|
|
6
|
+
|
|
7
|
+
> **Note:** TonIO is available on free-threaded Python and on Unix systems only.
|
|
8
|
+
|
|
9
|
+
## In a nutshell
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import tonio
|
|
13
|
+
|
|
14
|
+
def wait_and_add(x: int) -> int:
|
|
15
|
+
yield tonio.sleep(1)
|
|
16
|
+
return x + 1
|
|
17
|
+
|
|
18
|
+
def foo():
|
|
19
|
+
four, five = yield tonio.spawn(wait_and_add(3), wait_and_add(4))
|
|
20
|
+
return four, five
|
|
21
|
+
|
|
22
|
+
out = tonio.run(foo())
|
|
23
|
+
assert out == (4, 5)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
TonIO is released under the BSD License.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = 'tonio'
|
|
3
|
+
authors = [
|
|
4
|
+
{ name = 'Giovanni Barillari', email = 'g@baro.dev' }
|
|
5
|
+
]
|
|
6
|
+
classifiers = [
|
|
7
|
+
'Development Status :: 3 - Alpha',
|
|
8
|
+
'Intended Audience :: Developers',
|
|
9
|
+
'License :: OSI Approved :: BSD License',
|
|
10
|
+
'Operating System :: MacOS',
|
|
11
|
+
'Operating System :: POSIX :: Linux',
|
|
12
|
+
'Programming Language :: Python :: Free Threading :: 2 - Beta',
|
|
13
|
+
'Programming Language :: Python :: 3',
|
|
14
|
+
'Programming Language :: Python :: 3.14',
|
|
15
|
+
'Programming Language :: Python :: Implementation :: CPython',
|
|
16
|
+
'Programming Language :: Python',
|
|
17
|
+
'Programming Language :: Rust',
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
dynamic = [
|
|
21
|
+
'description',
|
|
22
|
+
'keywords',
|
|
23
|
+
'license',
|
|
24
|
+
'readme',
|
|
25
|
+
'version',
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
requires-python = '>=3.14'
|
|
29
|
+
dependencies = []
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
build = [
|
|
33
|
+
'maturin~=1.8',
|
|
34
|
+
]
|
|
35
|
+
lint = [
|
|
36
|
+
'ruff~=0.11',
|
|
37
|
+
]
|
|
38
|
+
test = [
|
|
39
|
+
'pytest~=8.3',
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
all = [
|
|
43
|
+
{ include-group = 'build' },
|
|
44
|
+
{ include-group = 'lint' },
|
|
45
|
+
{ include-group = 'test' },
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.urls]
|
|
49
|
+
Homepage = 'https://github.com/gi0baro/tonio'
|
|
50
|
+
Funding = 'https://github.com/sponsors/gi0baro'
|
|
51
|
+
Source = 'https://github.com/gi0baro/tonio'
|
|
52
|
+
|
|
53
|
+
[build-system]
|
|
54
|
+
requires = ['maturin>=1.8.0,<2']
|
|
55
|
+
build-backend = 'maturin'
|
|
56
|
+
|
|
57
|
+
[tool.maturin]
|
|
58
|
+
module-name = 'tonio._tonio'
|
|
59
|
+
bindings = 'pyo3'
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
line-length = 120
|
|
63
|
+
extend-select = [
|
|
64
|
+
# E and F are enabled by default
|
|
65
|
+
'B', # flake8-bugbear
|
|
66
|
+
'C4', # flake8-comprehensions
|
|
67
|
+
'C90', # mccabe
|
|
68
|
+
'I', # isort
|
|
69
|
+
'N', # pep8-naming
|
|
70
|
+
'Q', # flake8-quotes
|
|
71
|
+
'RUF100', # ruff (unused noqa)
|
|
72
|
+
'S', # flake8-bandit
|
|
73
|
+
'W', # pycodestyle
|
|
74
|
+
]
|
|
75
|
+
extend-ignore = [
|
|
76
|
+
'B008', # function calls in args defaults are fine
|
|
77
|
+
'B009', # getattr with constants is fine
|
|
78
|
+
'B034', # re.split won't confuse us
|
|
79
|
+
'B904', # rising without from is fine
|
|
80
|
+
'E501', # leave line length to black
|
|
81
|
+
'N818', # leave to us exceptions naming
|
|
82
|
+
'S101', # assert is fine
|
|
83
|
+
]
|
|
84
|
+
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
|
|
85
|
+
mccabe = { max-complexity = 25 }
|
|
86
|
+
|
|
87
|
+
[tool.ruff.format]
|
|
88
|
+
quote-style = 'single'
|
|
89
|
+
|
|
90
|
+
[tool.ruff.isort]
|
|
91
|
+
combine-as-imports = true
|
|
92
|
+
lines-after-imports = 2
|
|
93
|
+
known-first-party = ['tonio', 'tests']
|
|
94
|
+
|
|
95
|
+
[tool.ruff.per-file-ignores]
|
|
96
|
+
'tonio/_tonio.pyi' = ['I001']
|
|
97
|
+
'tests/**' = ['B018', 'S110', 'S501']
|
|
98
|
+
|
|
99
|
+
[tool.uv]
|
|
100
|
+
package = false
|