muru 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.
- muru-0.1.0a1/Cargo.lock +313 -0
- muru-0.1.0a1/Cargo.toml +32 -0
- muru-0.1.0a1/PKG-INFO +30 -0
- muru-0.1.0a1/README.md +7 -0
- muru-0.1.0a1/crates/muru-py/Cargo.toml +20 -0
- muru-0.1.0a1/crates/muru-py/src/lib.rs +21 -0
- muru-0.1.0a1/pyproject.toml +36 -0
- muru-0.1.0a1/python/muru/__init__.py +23 -0
- muru-0.1.0a1/python/muru/host.py +22 -0
- muru-0.1.0a1/python/muru/py.typed +0 -0
muru-0.1.0a1/Cargo.lock
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "anstream"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"anstyle",
|
|
12
|
+
"anstyle-parse",
|
|
13
|
+
"anstyle-query",
|
|
14
|
+
"anstyle-wincon",
|
|
15
|
+
"colorchoice",
|
|
16
|
+
"is_terminal_polyfill",
|
|
17
|
+
"utf8parse",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "anstyle"
|
|
22
|
+
version = "1.0.14"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "anstyle-parse"
|
|
28
|
+
version = "1.0.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
|
31
|
+
dependencies = [
|
|
32
|
+
"utf8parse",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "anstyle-query"
|
|
37
|
+
version = "1.1.5"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"windows-sys",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "anstyle-wincon"
|
|
46
|
+
version = "3.0.11"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
49
|
+
dependencies = [
|
|
50
|
+
"anstyle",
|
|
51
|
+
"once_cell_polyfill",
|
|
52
|
+
"windows-sys",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[[package]]
|
|
56
|
+
name = "anyhow"
|
|
57
|
+
version = "1.0.104"
|
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
+
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "clap"
|
|
63
|
+
version = "4.6.7"
|
|
64
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
+
checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
|
|
66
|
+
dependencies = [
|
|
67
|
+
"clap_builder",
|
|
68
|
+
"clap_derive",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
[[package]]
|
|
72
|
+
name = "clap_builder"
|
|
73
|
+
version = "4.6.7"
|
|
74
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
75
|
+
checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
|
|
76
|
+
dependencies = [
|
|
77
|
+
"anstream",
|
|
78
|
+
"anstyle",
|
|
79
|
+
"clap_lex",
|
|
80
|
+
"strsim",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[[package]]
|
|
84
|
+
name = "clap_derive"
|
|
85
|
+
version = "4.6.7"
|
|
86
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
+
checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
|
|
88
|
+
dependencies = [
|
|
89
|
+
"heck",
|
|
90
|
+
"proc-macro2",
|
|
91
|
+
"quote",
|
|
92
|
+
"syn",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "clap_lex"
|
|
97
|
+
version = "1.1.1"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
|
|
100
|
+
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "colorchoice"
|
|
103
|
+
version = "1.0.5"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "heck"
|
|
109
|
+
version = "0.5.0"
|
|
110
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
112
|
+
|
|
113
|
+
[[package]]
|
|
114
|
+
name = "is_terminal_polyfill"
|
|
115
|
+
version = "1.70.2"
|
|
116
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
118
|
+
|
|
119
|
+
[[package]]
|
|
120
|
+
name = "libc"
|
|
121
|
+
version = "0.2.191"
|
|
122
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
124
|
+
|
|
125
|
+
[[package]]
|
|
126
|
+
name = "muru-common"
|
|
127
|
+
version = "0.1.0-alpha.1"
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "muru-config"
|
|
131
|
+
version = "0.1.0-alpha.1"
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "muru-controller"
|
|
135
|
+
version = "0.1.0-alpha.1"
|
|
136
|
+
|
|
137
|
+
[[package]]
|
|
138
|
+
name = "muru-dashboard"
|
|
139
|
+
version = "0.1.0-alpha.1"
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "muru-edge"
|
|
143
|
+
version = "0.1.0-alpha.1"
|
|
144
|
+
|
|
145
|
+
[[package]]
|
|
146
|
+
name = "muru-proto"
|
|
147
|
+
version = "0.1.0-alpha.1"
|
|
148
|
+
|
|
149
|
+
[[package]]
|
|
150
|
+
name = "muru-py"
|
|
151
|
+
version = "0.1.0-alpha.1"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"pyo3",
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "muru-supervisor"
|
|
158
|
+
version = "0.1.0-alpha.1"
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "muru-testkit"
|
|
162
|
+
version = "0.1.0-alpha.1"
|
|
163
|
+
|
|
164
|
+
[[package]]
|
|
165
|
+
name = "muructl"
|
|
166
|
+
version = "0.1.0-alpha.1"
|
|
167
|
+
dependencies = [
|
|
168
|
+
"anyhow",
|
|
169
|
+
"clap",
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
[[package]]
|
|
173
|
+
name = "once_cell"
|
|
174
|
+
version = "1.21.4"
|
|
175
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
176
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "once_cell_polyfill"
|
|
180
|
+
version = "1.70.2"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
183
|
+
|
|
184
|
+
[[package]]
|
|
185
|
+
name = "portable-atomic"
|
|
186
|
+
version = "1.15.0"
|
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
188
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "proc-macro2"
|
|
192
|
+
version = "1.0.107"
|
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
195
|
+
dependencies = [
|
|
196
|
+
"unicode-ident",
|
|
197
|
+
]
|
|
198
|
+
|
|
199
|
+
[[package]]
|
|
200
|
+
name = "pyo3"
|
|
201
|
+
version = "0.30.1"
|
|
202
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
203
|
+
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
|
|
204
|
+
dependencies = [
|
|
205
|
+
"libc",
|
|
206
|
+
"once_cell",
|
|
207
|
+
"portable-atomic",
|
|
208
|
+
"pyo3-build-config",
|
|
209
|
+
"pyo3-ffi",
|
|
210
|
+
"pyo3-macros",
|
|
211
|
+
]
|
|
212
|
+
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "pyo3-build-config"
|
|
215
|
+
version = "0.30.1"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
|
|
218
|
+
dependencies = [
|
|
219
|
+
"target-lexicon",
|
|
220
|
+
]
|
|
221
|
+
|
|
222
|
+
[[package]]
|
|
223
|
+
name = "pyo3-ffi"
|
|
224
|
+
version = "0.30.1"
|
|
225
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
+
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
|
|
227
|
+
dependencies = [
|
|
228
|
+
"libc",
|
|
229
|
+
"pyo3-build-config",
|
|
230
|
+
]
|
|
231
|
+
|
|
232
|
+
[[package]]
|
|
233
|
+
name = "pyo3-macros"
|
|
234
|
+
version = "0.30.1"
|
|
235
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
236
|
+
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
|
|
237
|
+
dependencies = [
|
|
238
|
+
"proc-macro2",
|
|
239
|
+
"pyo3-macros-backend",
|
|
240
|
+
"quote",
|
|
241
|
+
"syn",
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
[[package]]
|
|
245
|
+
name = "pyo3-macros-backend"
|
|
246
|
+
version = "0.30.1"
|
|
247
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
248
|
+
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
|
|
249
|
+
dependencies = [
|
|
250
|
+
"heck",
|
|
251
|
+
"proc-macro2",
|
|
252
|
+
"quote",
|
|
253
|
+
"syn",
|
|
254
|
+
]
|
|
255
|
+
|
|
256
|
+
[[package]]
|
|
257
|
+
name = "quote"
|
|
258
|
+
version = "1.0.47"
|
|
259
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
261
|
+
dependencies = [
|
|
262
|
+
"proc-macro2",
|
|
263
|
+
]
|
|
264
|
+
|
|
265
|
+
[[package]]
|
|
266
|
+
name = "strsim"
|
|
267
|
+
version = "0.11.1"
|
|
268
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
269
|
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
270
|
+
|
|
271
|
+
[[package]]
|
|
272
|
+
name = "syn"
|
|
273
|
+
version = "3.0.9"
|
|
274
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
275
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
276
|
+
dependencies = [
|
|
277
|
+
"proc-macro2",
|
|
278
|
+
"quote",
|
|
279
|
+
"unicode-ident",
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "target-lexicon"
|
|
284
|
+
version = "0.13.5"
|
|
285
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
287
|
+
|
|
288
|
+
[[package]]
|
|
289
|
+
name = "unicode-ident"
|
|
290
|
+
version = "1.0.27"
|
|
291
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "utf8parse"
|
|
296
|
+
version = "0.2.2"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
299
|
+
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "windows-link"
|
|
302
|
+
version = "0.2.1"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
305
|
+
|
|
306
|
+
[[package]]
|
|
307
|
+
name = "windows-sys"
|
|
308
|
+
version = "0.61.2"
|
|
309
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
310
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
311
|
+
dependencies = [
|
|
312
|
+
"windows-link",
|
|
313
|
+
]
|
muru-0.1.0a1/Cargo.toml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "2"
|
|
3
|
+
members = ["crates/*"]
|
|
4
|
+
|
|
5
|
+
[workspace.package]
|
|
6
|
+
# The only place the project version is stated. Change it with `just bump`.
|
|
7
|
+
version = "0.1.0-alpha.1"
|
|
8
|
+
edition = "2024"
|
|
9
|
+
rust-version = "1.85"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
repository = "https://github.com/GrahamDumpleton/muru"
|
|
12
|
+
homepage = "https://github.com/GrahamDumpleton/muru"
|
|
13
|
+
authors = ["Graham Dumpleton"]
|
|
14
|
+
publish = false
|
|
15
|
+
|
|
16
|
+
[workspace.dependencies]
|
|
17
|
+
anyhow = "1"
|
|
18
|
+
clap = { version = "4.5", features = ["derive"] }
|
|
19
|
+
pyo3 = { version = "0.30", features = ["extension-module"] }
|
|
20
|
+
thiserror = "2"
|
|
21
|
+
tracing = "0.1"
|
|
22
|
+
|
|
23
|
+
[workspace.lints.rust]
|
|
24
|
+
missing_docs = "warn"
|
|
25
|
+
unsafe_op_in_unsafe_fn = "warn"
|
|
26
|
+
|
|
27
|
+
[workspace.lints.clippy]
|
|
28
|
+
undocumented_unsafe_blocks = "warn"
|
|
29
|
+
|
|
30
|
+
[profile.release]
|
|
31
|
+
lto = "thin"
|
|
32
|
+
codegen-units = 1
|
muru-0.1.0a1/PKG-INFO
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: muru
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Classifier: Development Status :: 1 - Planning
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
7
|
+
Classifier: Operating System :: MacOS
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
|
|
13
|
+
Summary: Muru runtime library for WSGI and ASGI applications
|
|
14
|
+
Author: Graham Dumpleton
|
|
15
|
+
License-Expression: Apache-2.0
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
18
|
+
Project-URL: Changelog, https://github.com/GrahamDumpleton/muru/blob/main/CHANGELOG.md
|
|
19
|
+
Project-URL: Documentation, https://muru.readthedocs.io/
|
|
20
|
+
Project-URL: Homepage, https://github.com/GrahamDumpleton/muru
|
|
21
|
+
Project-URL: Repository, https://github.com/GrahamDumpleton/muru
|
|
22
|
+
|
|
23
|
+
# muru
|
|
24
|
+
|
|
25
|
+
The Muru runtime library: the Python package, with its Rust extension, that
|
|
26
|
+
runs inside Muru host and worker processes. It has no Python dependencies and
|
|
27
|
+
is safe to import outside Muru.
|
|
28
|
+
|
|
29
|
+
Install `muructl` to run applications. See https://github.com/GrahamDumpleton/muru.
|
|
30
|
+
|
muru-0.1.0a1/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# muru
|
|
2
|
+
|
|
3
|
+
The Muru runtime library: the Python package, with its Rust extension, that
|
|
4
|
+
runs inside Muru host and worker processes. It has no Python dependencies and
|
|
5
|
+
is safe to import outside Muru.
|
|
6
|
+
|
|
7
|
+
Install `muructl` to run applications. See https://github.com/GrahamDumpleton/muru.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "muru-py"
|
|
3
|
+
description = "The muru._native extension: worker gRPC server, WSGI and ASGI bridges, watchdog and descriptor side channel."
|
|
4
|
+
version.workspace = true
|
|
5
|
+
edition.workspace = true
|
|
6
|
+
rust-version.workspace = true
|
|
7
|
+
license.workspace = true
|
|
8
|
+
repository.workspace = true
|
|
9
|
+
authors.workspace = true
|
|
10
|
+
publish.workspace = true
|
|
11
|
+
|
|
12
|
+
[lib]
|
|
13
|
+
name = "_native"
|
|
14
|
+
crate-type = ["cdylib"]
|
|
15
|
+
|
|
16
|
+
[dependencies]
|
|
17
|
+
pyo3 = { workspace = true }
|
|
18
|
+
|
|
19
|
+
[lints]
|
|
20
|
+
workspace = true
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//! The `muru._native` extension module.
|
|
2
|
+
//!
|
|
3
|
+
//! Placeholder created with the project skeleton. Phase 0 adds the tonic
|
|
4
|
+
//! server started after fork, the WSGI bridge and the descriptor side channel
|
|
5
|
+
//! (design specification sections 5 and 6). The module is declared
|
|
6
|
+
//! free-threading compatible from the start (section 6.11).
|
|
7
|
+
|
|
8
|
+
use pyo3::prelude::*;
|
|
9
|
+
|
|
10
|
+
/// Return the version of the extension, for `muru.__version__` checks.
|
|
11
|
+
#[pyfunction]
|
|
12
|
+
fn version() -> &'static str {
|
|
13
|
+
env!("CARGO_PKG_VERSION")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/// Module initialisation for `muru._native`.
|
|
17
|
+
#[pymodule(gil_used = false)]
|
|
18
|
+
fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
19
|
+
m.add_function(wrap_pyfunction!(version, m)?)?;
|
|
20
|
+
Ok(())
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.8,<2"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "muru"
|
|
7
|
+
dynamic = ["version"] # taken from Cargo.toml by maturin
|
|
8
|
+
description = "Muru runtime library for WSGI and ASGI applications"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
authors = [{ name = "Graham Dumpleton" }]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
dependencies = []
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 1 - Planning",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Operating System :: POSIX :: Linux",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
22
|
+
"Programming Language :: Rust",
|
|
23
|
+
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/GrahamDumpleton/muru"
|
|
28
|
+
Documentation = "https://muru.readthedocs.io/"
|
|
29
|
+
Repository = "https://github.com/GrahamDumpleton/muru"
|
|
30
|
+
Changelog = "https://github.com/GrahamDumpleton/muru/blob/main/CHANGELOG.md"
|
|
31
|
+
|
|
32
|
+
[tool.maturin]
|
|
33
|
+
module-name = "muru._native"
|
|
34
|
+
features = ["pyo3/extension-module"]
|
|
35
|
+
manifest-path = "crates/muru-py/Cargo.toml"
|
|
36
|
+
python-source = "python"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Muru runtime library.
|
|
2
|
+
|
|
3
|
+
This package runs inside every Muru host and worker process. It is also safe
|
|
4
|
+
to import outside Muru, where every function returns development defaults, so
|
|
5
|
+
applications can use it unconditionally.
|
|
6
|
+
|
|
7
|
+
The repository holds only the skeleton so far; see the design specification
|
|
8
|
+
(docs/project/design, section 6) for the planned API.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
14
|
+
|
|
15
|
+
__all__ = ["__version__"]
|
|
16
|
+
|
|
17
|
+
# The version is written into the wheel metadata by maturin from Cargo.toml.
|
|
18
|
+
# When the package is imported from the source tree without being installed,
|
|
19
|
+
# there is no metadata to read.
|
|
20
|
+
try:
|
|
21
|
+
__version__ = version("muru")
|
|
22
|
+
except PackageNotFoundError:
|
|
23
|
+
__version__ = "0+unknown"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Host process entry point, run as ``python -m muru.host``.
|
|
2
|
+
|
|
3
|
+
The host preloads the application, forks and supervises workers, and acts as
|
|
4
|
+
PID 1 in containers (design specification sections 6.1, 6.2 and 6.10). This
|
|
5
|
+
is a placeholder created with the project skeleton.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main(argv: list[str] | None = None) -> int:
|
|
14
|
+
"""Run the host. Not implemented yet; returns a non-zero exit status."""
|
|
15
|
+
|
|
16
|
+
del argv
|
|
17
|
+
print("muru.host is not implemented yet; see docs/project/roadmap.md", file=sys.stderr)
|
|
18
|
+
return 2
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
sys.exit(main(sys.argv[1:]))
|
|
File without changes
|