saferoute 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.
- saferoute-0.1.0/Cargo.lock +491 -0
- saferoute-0.1.0/Cargo.toml +30 -0
- saferoute-0.1.0/LICENSE +21 -0
- saferoute-0.1.0/PKG-INFO +275 -0
- saferoute-0.1.0/README.md +218 -0
- saferoute-0.1.0/pyproject.toml +237 -0
- saferoute-0.1.0/src/rust/Cargo.toml +72 -0
- saferoute-0.1.0/src/rust/audit.toml +25 -0
- saferoute-0.1.0/src/rust/src/algorithms/astar_apex.rs +397 -0
- saferoute-0.1.0/src/rust/src/algorithms/mod.rs +5 -0
- saferoute-0.1.0/src/rust/src/algorithms/pareto.rs +193 -0
- saferoute-0.1.0/src/rust/src/graph/loader.rs +76 -0
- saferoute-0.1.0/src/rust/src/graph/mod.rs +54 -0
- saferoute-0.1.0/src/rust/src/lib.rs +19 -0
- saferoute-0.1.0/src/rust/src/scoring/mod.rs +4 -0
- saferoute-0.1.0/src/rust/src/scoring/risk.rs +101 -0
- saferoute-0.1.0/src/rust/tests/integration.rs +232 -0
- saferoute-0.1.0/src/saferoute/__init__.py +35 -0
- saferoute-0.1.0/src/saferoute/_cli.py +43 -0
- saferoute-0.1.0/src/saferoute/api/__init__.py +0 -0
- saferoute-0.1.0/src/saferoute/api/main.py +136 -0
- saferoute-0.1.0/src/saferoute/api/routes.py +217 -0
- saferoute-0.1.0/src/saferoute/api/schemas.py +110 -0
- saferoute-0.1.0/src/saferoute/data_loader.py +448 -0
- saferoute-0.1.0/src/saferoute/engine.py +351 -0
- saferoute-0.1.0/src/saferoute/exceptions.py +114 -0
- saferoute-0.1.0/src/saferoute/familiarity.py +229 -0
- saferoute-0.1.0/src/saferoute/graph_cache.py +190 -0
- saferoute-0.1.0/src/saferoute/graph_validator.py +161 -0
- saferoute-0.1.0/src/saferoute/kde_scorer.py +213 -0
- saferoute-0.1.0/src/saferoute/models.py +61 -0
- saferoute-0.1.0/src/saferoute/py.typed +0 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "aho-corasick"
|
|
7
|
+
version = "1.1.4"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"memchr",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "anstream"
|
|
16
|
+
version = "1.0.0"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
19
|
+
dependencies = [
|
|
20
|
+
"anstyle",
|
|
21
|
+
"anstyle-parse",
|
|
22
|
+
"anstyle-query",
|
|
23
|
+
"anstyle-wincon",
|
|
24
|
+
"colorchoice",
|
|
25
|
+
"is_terminal_polyfill",
|
|
26
|
+
"utf8parse",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "anstyle"
|
|
31
|
+
version = "1.0.14"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "anstyle-parse"
|
|
37
|
+
version = "1.0.0"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"utf8parse",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "anstyle-query"
|
|
46
|
+
version = "1.1.5"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
49
|
+
dependencies = [
|
|
50
|
+
"windows-sys",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "anstyle-wincon"
|
|
55
|
+
version = "3.0.11"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"anstyle",
|
|
60
|
+
"once_cell_polyfill",
|
|
61
|
+
"windows-sys",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[[package]]
|
|
65
|
+
name = "anyhow"
|
|
66
|
+
version = "1.0.102"
|
|
67
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
|
+
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "approx"
|
|
72
|
+
version = "0.5.1"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
|
|
75
|
+
dependencies = [
|
|
76
|
+
"num-traits",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "autocfg"
|
|
81
|
+
version = "1.5.0"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
84
|
+
|
|
85
|
+
[[package]]
|
|
86
|
+
name = "cfg-if"
|
|
87
|
+
version = "1.0.4"
|
|
88
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "colorchoice"
|
|
93
|
+
version = "1.0.5"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
96
|
+
|
|
97
|
+
[[package]]
|
|
98
|
+
name = "env_filter"
|
|
99
|
+
version = "1.0.1"
|
|
100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
|
+
checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
|
|
102
|
+
dependencies = [
|
|
103
|
+
"log",
|
|
104
|
+
"regex",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "env_logger"
|
|
109
|
+
version = "0.11.10"
|
|
110
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
+
checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
|
|
112
|
+
dependencies = [
|
|
113
|
+
"anstream",
|
|
114
|
+
"anstyle",
|
|
115
|
+
"env_filter",
|
|
116
|
+
"jiff",
|
|
117
|
+
"log",
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
[[package]]
|
|
121
|
+
name = "heck"
|
|
122
|
+
version = "0.5.0"
|
|
123
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
125
|
+
|
|
126
|
+
[[package]]
|
|
127
|
+
name = "indoc"
|
|
128
|
+
version = "2.0.7"
|
|
129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
131
|
+
dependencies = [
|
|
132
|
+
"rustversion",
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
[[package]]
|
|
136
|
+
name = "is_terminal_polyfill"
|
|
137
|
+
version = "1.70.2"
|
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "itoa"
|
|
143
|
+
version = "1.0.18"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
146
|
+
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "jiff"
|
|
149
|
+
version = "0.2.23"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"jiff-static",
|
|
154
|
+
"log",
|
|
155
|
+
"portable-atomic",
|
|
156
|
+
"portable-atomic-util",
|
|
157
|
+
"serde_core",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "jiff-static"
|
|
162
|
+
version = "0.2.23"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4"
|
|
165
|
+
dependencies = [
|
|
166
|
+
"proc-macro2",
|
|
167
|
+
"quote",
|
|
168
|
+
"syn",
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
[[package]]
|
|
172
|
+
name = "libc"
|
|
173
|
+
version = "0.2.184"
|
|
174
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
175
|
+
checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
|
|
176
|
+
|
|
177
|
+
[[package]]
|
|
178
|
+
name = "log"
|
|
179
|
+
version = "0.4.29"
|
|
180
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
181
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
182
|
+
|
|
183
|
+
[[package]]
|
|
184
|
+
name = "memchr"
|
|
185
|
+
version = "2.8.0"
|
|
186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
188
|
+
|
|
189
|
+
[[package]]
|
|
190
|
+
name = "memoffset"
|
|
191
|
+
version = "0.9.1"
|
|
192
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
194
|
+
dependencies = [
|
|
195
|
+
"autocfg",
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
[[package]]
|
|
199
|
+
name = "num-traits"
|
|
200
|
+
version = "0.2.19"
|
|
201
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
202
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
203
|
+
dependencies = [
|
|
204
|
+
"autocfg",
|
|
205
|
+
]
|
|
206
|
+
|
|
207
|
+
[[package]]
|
|
208
|
+
name = "once_cell"
|
|
209
|
+
version = "1.21.4"
|
|
210
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
212
|
+
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "once_cell_polyfill"
|
|
215
|
+
version = "1.70.2"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
218
|
+
|
|
219
|
+
[[package]]
|
|
220
|
+
name = "ordered-float"
|
|
221
|
+
version = "4.6.0"
|
|
222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
+
checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
|
|
224
|
+
dependencies = [
|
|
225
|
+
"num-traits",
|
|
226
|
+
]
|
|
227
|
+
|
|
228
|
+
[[package]]
|
|
229
|
+
name = "portable-atomic"
|
|
230
|
+
version = "1.13.1"
|
|
231
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
233
|
+
|
|
234
|
+
[[package]]
|
|
235
|
+
name = "portable-atomic-util"
|
|
236
|
+
version = "0.2.6"
|
|
237
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
238
|
+
checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3"
|
|
239
|
+
dependencies = [
|
|
240
|
+
"portable-atomic",
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
[[package]]
|
|
244
|
+
name = "proc-macro2"
|
|
245
|
+
version = "1.0.106"
|
|
246
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
247
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
248
|
+
dependencies = [
|
|
249
|
+
"unicode-ident",
|
|
250
|
+
]
|
|
251
|
+
|
|
252
|
+
[[package]]
|
|
253
|
+
name = "pyo3"
|
|
254
|
+
version = "0.23.5"
|
|
255
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
+
checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872"
|
|
257
|
+
dependencies = [
|
|
258
|
+
"cfg-if",
|
|
259
|
+
"indoc",
|
|
260
|
+
"libc",
|
|
261
|
+
"memoffset",
|
|
262
|
+
"once_cell",
|
|
263
|
+
"portable-atomic",
|
|
264
|
+
"pyo3-build-config",
|
|
265
|
+
"pyo3-ffi",
|
|
266
|
+
"pyo3-macros",
|
|
267
|
+
"unindent",
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
[[package]]
|
|
271
|
+
name = "pyo3-build-config"
|
|
272
|
+
version = "0.23.5"
|
|
273
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
+
checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
|
|
275
|
+
dependencies = [
|
|
276
|
+
"once_cell",
|
|
277
|
+
"target-lexicon",
|
|
278
|
+
]
|
|
279
|
+
|
|
280
|
+
[[package]]
|
|
281
|
+
name = "pyo3-ffi"
|
|
282
|
+
version = "0.23.5"
|
|
283
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
284
|
+
checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d"
|
|
285
|
+
dependencies = [
|
|
286
|
+
"libc",
|
|
287
|
+
"pyo3-build-config",
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
[[package]]
|
|
291
|
+
name = "pyo3-macros"
|
|
292
|
+
version = "0.23.5"
|
|
293
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
294
|
+
checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da"
|
|
295
|
+
dependencies = [
|
|
296
|
+
"proc-macro2",
|
|
297
|
+
"pyo3-macros-backend",
|
|
298
|
+
"quote",
|
|
299
|
+
"syn",
|
|
300
|
+
]
|
|
301
|
+
|
|
302
|
+
[[package]]
|
|
303
|
+
name = "pyo3-macros-backend"
|
|
304
|
+
version = "0.23.5"
|
|
305
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
|
+
checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028"
|
|
307
|
+
dependencies = [
|
|
308
|
+
"heck",
|
|
309
|
+
"proc-macro2",
|
|
310
|
+
"pyo3-build-config",
|
|
311
|
+
"quote",
|
|
312
|
+
"syn",
|
|
313
|
+
]
|
|
314
|
+
|
|
315
|
+
[[package]]
|
|
316
|
+
name = "quote"
|
|
317
|
+
version = "1.0.45"
|
|
318
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
320
|
+
dependencies = [
|
|
321
|
+
"proc-macro2",
|
|
322
|
+
]
|
|
323
|
+
|
|
324
|
+
[[package]]
|
|
325
|
+
name = "regex"
|
|
326
|
+
version = "1.12.3"
|
|
327
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
328
|
+
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
|
329
|
+
dependencies = [
|
|
330
|
+
"aho-corasick",
|
|
331
|
+
"memchr",
|
|
332
|
+
"regex-automata",
|
|
333
|
+
"regex-syntax",
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
[[package]]
|
|
337
|
+
name = "regex-automata"
|
|
338
|
+
version = "0.4.14"
|
|
339
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
340
|
+
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
|
341
|
+
dependencies = [
|
|
342
|
+
"aho-corasick",
|
|
343
|
+
"memchr",
|
|
344
|
+
"regex-syntax",
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
[[package]]
|
|
348
|
+
name = "regex-syntax"
|
|
349
|
+
version = "0.8.10"
|
|
350
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
351
|
+
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
|
352
|
+
|
|
353
|
+
[[package]]
|
|
354
|
+
name = "rustversion"
|
|
355
|
+
version = "1.0.22"
|
|
356
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
358
|
+
|
|
359
|
+
[[package]]
|
|
360
|
+
name = "saferoute-core"
|
|
361
|
+
version = "0.1.0"
|
|
362
|
+
dependencies = [
|
|
363
|
+
"anyhow",
|
|
364
|
+
"approx",
|
|
365
|
+
"env_logger",
|
|
366
|
+
"log",
|
|
367
|
+
"ordered-float",
|
|
368
|
+
"pyo3",
|
|
369
|
+
"serde",
|
|
370
|
+
"serde_json",
|
|
371
|
+
"thiserror",
|
|
372
|
+
]
|
|
373
|
+
|
|
374
|
+
[[package]]
|
|
375
|
+
name = "serde"
|
|
376
|
+
version = "1.0.228"
|
|
377
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
378
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
379
|
+
dependencies = [
|
|
380
|
+
"serde_core",
|
|
381
|
+
"serde_derive",
|
|
382
|
+
]
|
|
383
|
+
|
|
384
|
+
[[package]]
|
|
385
|
+
name = "serde_core"
|
|
386
|
+
version = "1.0.228"
|
|
387
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
388
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
389
|
+
dependencies = [
|
|
390
|
+
"serde_derive",
|
|
391
|
+
]
|
|
392
|
+
|
|
393
|
+
[[package]]
|
|
394
|
+
name = "serde_derive"
|
|
395
|
+
version = "1.0.228"
|
|
396
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
397
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
398
|
+
dependencies = [
|
|
399
|
+
"proc-macro2",
|
|
400
|
+
"quote",
|
|
401
|
+
"syn",
|
|
402
|
+
]
|
|
403
|
+
|
|
404
|
+
[[package]]
|
|
405
|
+
name = "serde_json"
|
|
406
|
+
version = "1.0.149"
|
|
407
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
408
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
409
|
+
dependencies = [
|
|
410
|
+
"itoa",
|
|
411
|
+
"memchr",
|
|
412
|
+
"serde",
|
|
413
|
+
"serde_core",
|
|
414
|
+
"zmij",
|
|
415
|
+
]
|
|
416
|
+
|
|
417
|
+
[[package]]
|
|
418
|
+
name = "syn"
|
|
419
|
+
version = "2.0.117"
|
|
420
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
421
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
422
|
+
dependencies = [
|
|
423
|
+
"proc-macro2",
|
|
424
|
+
"quote",
|
|
425
|
+
"unicode-ident",
|
|
426
|
+
]
|
|
427
|
+
|
|
428
|
+
[[package]]
|
|
429
|
+
name = "target-lexicon"
|
|
430
|
+
version = "0.12.16"
|
|
431
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
433
|
+
|
|
434
|
+
[[package]]
|
|
435
|
+
name = "thiserror"
|
|
436
|
+
version = "1.0.69"
|
|
437
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
438
|
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
439
|
+
dependencies = [
|
|
440
|
+
"thiserror-impl",
|
|
441
|
+
]
|
|
442
|
+
|
|
443
|
+
[[package]]
|
|
444
|
+
name = "thiserror-impl"
|
|
445
|
+
version = "1.0.69"
|
|
446
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
448
|
+
dependencies = [
|
|
449
|
+
"proc-macro2",
|
|
450
|
+
"quote",
|
|
451
|
+
"syn",
|
|
452
|
+
]
|
|
453
|
+
|
|
454
|
+
[[package]]
|
|
455
|
+
name = "unicode-ident"
|
|
456
|
+
version = "1.0.24"
|
|
457
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
458
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
459
|
+
|
|
460
|
+
[[package]]
|
|
461
|
+
name = "unindent"
|
|
462
|
+
version = "0.2.4"
|
|
463
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
464
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
465
|
+
|
|
466
|
+
[[package]]
|
|
467
|
+
name = "utf8parse"
|
|
468
|
+
version = "0.2.2"
|
|
469
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
470
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
471
|
+
|
|
472
|
+
[[package]]
|
|
473
|
+
name = "windows-link"
|
|
474
|
+
version = "0.2.1"
|
|
475
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
476
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
477
|
+
|
|
478
|
+
[[package]]
|
|
479
|
+
name = "windows-sys"
|
|
480
|
+
version = "0.61.2"
|
|
481
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
482
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
483
|
+
dependencies = [
|
|
484
|
+
"windows-link",
|
|
485
|
+
]
|
|
486
|
+
|
|
487
|
+
[[package]]
|
|
488
|
+
name = "zmij"
|
|
489
|
+
version = "1.0.21"
|
|
490
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
491
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Fait par Gillesto
|
|
2
|
+
# Cargo.toml — Workspace Rust racine
|
|
3
|
+
#
|
|
4
|
+
# Ce fichier est lu par maturin via [tool.maturin] manifest-path dans pyproject.toml.
|
|
5
|
+
# Il déclare un workspace contenant un seul membre : le crate saferoute-core.
|
|
6
|
+
#
|
|
7
|
+
# Pourquoi un workspace à la racine ?
|
|
8
|
+
# - Permet à `cargo test` et `cargo build` de fonctionner depuis SafeRoute/
|
|
9
|
+
# - Centralise les profils de compilation (release, dev)
|
|
10
|
+
# - Prépare l'ajout futur de crates supplémentaires (ex: saferoute-cli)
|
|
11
|
+
|
|
12
|
+
[workspace]
|
|
13
|
+
members = ["src/rust"]
|
|
14
|
+
resolver = "2"
|
|
15
|
+
|
|
16
|
+
# ── Profil de développement ───────────────────────────────────────────────────
|
|
17
|
+
# Utilisé par `cargo build` et `maturin develop` (sans --release)
|
|
18
|
+
[profile.dev]
|
|
19
|
+
opt-level = 0 # pas d'optimisation → compilation rapide
|
|
20
|
+
debug = true # symboles de debug inclus
|
|
21
|
+
|
|
22
|
+
# ── Profil de release ─────────────────────────────────────────────────────────
|
|
23
|
+
# Utilisé par `cargo build --release` et `maturin build --release`
|
|
24
|
+
# Ces paramètres sont hérités par le crate membre src/rust/
|
|
25
|
+
[profile.release]
|
|
26
|
+
opt-level = 3 # optimisation maximale
|
|
27
|
+
lto = true # Link-Time Optimization → réduit la taille du .so et améliore les perfs
|
|
28
|
+
codegen-units = 1 # un seul codegen unit → meilleure optimisation inter-fonctions
|
|
29
|
+
strip = true # supprime les symboles de debug du binaire final
|
|
30
|
+
panic = "abort" # pas de stack unwinding → binaire plus petit, légèrement plus rapide
|
saferoute-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gillesto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|