polyxml 0.11.1__tar.gz → 0.12.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.
- {polyxml-0.11.1 → polyxml-0.12.0}/Cargo.lock +279 -4
- {polyxml-0.11.1 → polyxml-0.12.0}/Cargo.toml +1 -1
- {polyxml-0.11.1 → polyxml-0.12.0}/PKG-INFO +4 -1
- {polyxml-0.11.1/crates/polyxml-python → polyxml-0.12.0}/README.md +2 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/Cargo.toml +4 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/README.md +26 -4
- polyxml-0.12.0/crates/polyxml-core/src/codegen/cpp/mod.rs +906 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/csharp/mod.rs +781 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/go/mod.rs +733 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/java/mod.rs +689 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/mod.rs +553 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/python/mod.rs +780 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/rust/mod.rs +1932 -0
- polyxml-0.12.0/crates/polyxml-core/src/codegen/typescript/mod.rs +681 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/error.rs +13 -0
- polyxml-0.12.0/crates/polyxml-core/src/ir/mod.rs +475 -0
- polyxml-0.12.0/crates/polyxml-core/src/ir/tarjan.rs +201 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/lib.rs +3 -0
- polyxml-0.12.0/crates/polyxml-core/src/schema_parser/mod.rs +916 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_cpp_codegen.rs +864 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_csharp_codegen.rs +620 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_go_codegen.rs +512 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_java_codegen.rs +329 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_python_codegen.rs +392 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_rust_codecs.rs +560 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_rust_codegen.rs +437 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_schema_ir.rs +427 -0
- polyxml-0.12.0/crates/polyxml-core/tests/test_ts_codegen.rs +366 -0
- {polyxml-0.11.1 → polyxml-0.12.0/crates/polyxml-python}/README.md +2 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-python/src/lib.rs +18 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-python/tests/test_conformance.py +64 -14
- polyxml-0.12.0/crates/polyxml-python/tests/test_generated_models.py +369 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-python/tests/test_polyxml.py +2 -2
- {polyxml-0.11.1 → polyxml-0.12.0}/pyproject.toml +2 -1
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/converters.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/parser.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/schema.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/serializer.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/src/value.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/tests/test_conformance.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/tests/test_core.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-core/tests/test_security.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/crates/polyxml-python/Cargo.toml +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/python/polyxml/AGENT_GUIDE.md +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/python/polyxml/__init__.py +0 -0
- {polyxml-0.11.1 → polyxml-0.12.0}/python/polyxml/py.typed +0 -0
|
@@ -26,12 +26,56 @@ version = "0.1.6"
|
|
|
26
26
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
27
|
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
|
|
28
28
|
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "anstream"
|
|
31
|
+
version = "1.0.0"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
34
|
+
dependencies = [
|
|
35
|
+
"anstyle",
|
|
36
|
+
"anstyle-parse",
|
|
37
|
+
"anstyle-query",
|
|
38
|
+
"anstyle-wincon",
|
|
39
|
+
"colorchoice",
|
|
40
|
+
"is_terminal_polyfill",
|
|
41
|
+
"utf8parse",
|
|
42
|
+
]
|
|
43
|
+
|
|
29
44
|
[[package]]
|
|
30
45
|
name = "anstyle"
|
|
31
46
|
version = "1.0.14"
|
|
32
47
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
48
|
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
34
49
|
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "anstyle-parse"
|
|
52
|
+
version = "1.0.0"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
|
55
|
+
dependencies = [
|
|
56
|
+
"utf8parse",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[[package]]
|
|
60
|
+
name = "anstyle-query"
|
|
61
|
+
version = "1.1.5"
|
|
62
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
63
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
64
|
+
dependencies = [
|
|
65
|
+
"windows-sys",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "anstyle-wincon"
|
|
70
|
+
version = "3.0.11"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
73
|
+
dependencies = [
|
|
74
|
+
"anstyle",
|
|
75
|
+
"once_cell_polyfill",
|
|
76
|
+
"windows-sys",
|
|
77
|
+
]
|
|
78
|
+
|
|
35
79
|
[[package]]
|
|
36
80
|
name = "autocfg"
|
|
37
81
|
version = "1.5.1"
|
|
@@ -100,6 +144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
100
144
|
checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
|
|
101
145
|
dependencies = [
|
|
102
146
|
"clap_builder",
|
|
147
|
+
"clap_derive",
|
|
103
148
|
]
|
|
104
149
|
|
|
105
150
|
[[package]]
|
|
@@ -108,8 +153,22 @@ version = "4.6.6"
|
|
|
108
153
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
154
|
checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
|
|
110
155
|
dependencies = [
|
|
156
|
+
"anstream",
|
|
111
157
|
"anstyle",
|
|
112
158
|
"clap_lex",
|
|
159
|
+
"strsim",
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "clap_derive"
|
|
164
|
+
version = "4.6.4"
|
|
165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
166
|
+
checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
|
|
167
|
+
dependencies = [
|
|
168
|
+
"heck",
|
|
169
|
+
"proc-macro2",
|
|
170
|
+
"quote",
|
|
171
|
+
"syn 3.0.5",
|
|
113
172
|
]
|
|
114
173
|
|
|
115
174
|
[[package]]
|
|
@@ -118,6 +177,12 @@ version = "1.1.0"
|
|
|
118
177
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
178
|
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
|
|
120
179
|
|
|
180
|
+
[[package]]
|
|
181
|
+
name = "colorchoice"
|
|
182
|
+
version = "1.0.5"
|
|
183
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
184
|
+
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
185
|
+
|
|
121
186
|
[[package]]
|
|
122
187
|
name = "convert_case"
|
|
123
188
|
version = "0.6.0"
|
|
@@ -188,12 +253,51 @@ version = "1.18.0"
|
|
|
188
253
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
254
|
checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
|
|
190
255
|
|
|
256
|
+
[[package]]
|
|
257
|
+
name = "equivalent"
|
|
258
|
+
version = "1.0.2"
|
|
259
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
261
|
+
|
|
262
|
+
[[package]]
|
|
263
|
+
name = "errno"
|
|
264
|
+
version = "0.3.14"
|
|
265
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
266
|
+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
|
267
|
+
dependencies = [
|
|
268
|
+
"libc",
|
|
269
|
+
"windows-sys",
|
|
270
|
+
]
|
|
271
|
+
|
|
272
|
+
[[package]]
|
|
273
|
+
name = "fastrand"
|
|
274
|
+
version = "2.5.0"
|
|
275
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
276
|
+
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
277
|
+
|
|
191
278
|
[[package]]
|
|
192
279
|
name = "find-msvc-tools"
|
|
193
280
|
version = "0.1.12"
|
|
194
281
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
195
282
|
checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d"
|
|
196
283
|
|
|
284
|
+
[[package]]
|
|
285
|
+
name = "getrandom"
|
|
286
|
+
version = "0.4.3"
|
|
287
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
288
|
+
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
289
|
+
dependencies = [
|
|
290
|
+
"cfg-if",
|
|
291
|
+
"libc",
|
|
292
|
+
"r-efi",
|
|
293
|
+
]
|
|
294
|
+
|
|
295
|
+
[[package]]
|
|
296
|
+
name = "glob"
|
|
297
|
+
version = "0.3.4"
|
|
298
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
+
checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
|
|
300
|
+
|
|
197
301
|
[[package]]
|
|
198
302
|
name = "half"
|
|
199
303
|
version = "2.7.1"
|
|
@@ -205,12 +309,34 @@ dependencies = [
|
|
|
205
309
|
"zerocopy",
|
|
206
310
|
]
|
|
207
311
|
|
|
312
|
+
[[package]]
|
|
313
|
+
name = "hashbrown"
|
|
314
|
+
version = "0.17.1"
|
|
315
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
316
|
+
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
317
|
+
|
|
208
318
|
[[package]]
|
|
209
319
|
name = "heck"
|
|
210
320
|
version = "0.5.0"
|
|
211
321
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
322
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
213
323
|
|
|
324
|
+
[[package]]
|
|
325
|
+
name = "indexmap"
|
|
326
|
+
version = "2.14.2"
|
|
327
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
328
|
+
checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
|
|
329
|
+
dependencies = [
|
|
330
|
+
"equivalent",
|
|
331
|
+
"hashbrown",
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
[[package]]
|
|
335
|
+
name = "is_terminal_polyfill"
|
|
336
|
+
version = "1.70.2"
|
|
337
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
339
|
+
|
|
214
340
|
[[package]]
|
|
215
341
|
name = "itertools"
|
|
216
342
|
version = "0.13.0"
|
|
@@ -299,12 +425,34 @@ dependencies = [
|
|
|
299
425
|
"windows-link",
|
|
300
426
|
]
|
|
301
427
|
|
|
428
|
+
[[package]]
|
|
429
|
+
name = "linux-raw-sys"
|
|
430
|
+
version = "0.12.1"
|
|
431
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
+
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
433
|
+
|
|
302
434
|
[[package]]
|
|
303
435
|
name = "memchr"
|
|
304
436
|
version = "2.8.3"
|
|
305
437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
438
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
307
439
|
|
|
440
|
+
[[package]]
|
|
441
|
+
name = "memo-map"
|
|
442
|
+
version = "0.3.4"
|
|
443
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
444
|
+
checksum = "5449c8c750f1a07ea702bbd212bd999fceece9b3d1508b17023b3e174583124b"
|
|
445
|
+
|
|
446
|
+
[[package]]
|
|
447
|
+
name = "minijinja"
|
|
448
|
+
version = "2.24.0"
|
|
449
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
450
|
+
checksum = "86886cf6dbf4e614b19c9a1eec9775f021869d7eadde0fc73921a81b90c9b4c9"
|
|
451
|
+
dependencies = [
|
|
452
|
+
"memo-map",
|
|
453
|
+
"serde",
|
|
454
|
+
]
|
|
455
|
+
|
|
308
456
|
[[package]]
|
|
309
457
|
name = "napi"
|
|
310
458
|
version = "2.16.17"
|
|
@@ -377,6 +525,12 @@ version = "1.21.4"
|
|
|
377
525
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
378
526
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
379
527
|
|
|
528
|
+
[[package]]
|
|
529
|
+
name = "once_cell_polyfill"
|
|
530
|
+
version = "1.70.2"
|
|
531
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
532
|
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
533
|
+
|
|
380
534
|
[[package]]
|
|
381
535
|
name = "oorandom"
|
|
382
536
|
version = "11.1.5"
|
|
@@ -395,27 +549,45 @@ dependencies = [
|
|
|
395
549
|
|
|
396
550
|
[[package]]
|
|
397
551
|
name = "polyxml"
|
|
398
|
-
version = "0.
|
|
552
|
+
version = "0.12.0"
|
|
399
553
|
dependencies = [
|
|
400
554
|
"criterion",
|
|
555
|
+
"heck",
|
|
401
556
|
"lexical-core",
|
|
402
557
|
"memchr",
|
|
558
|
+
"minijinja",
|
|
403
559
|
"pretty_assertions",
|
|
404
560
|
"quick-xml",
|
|
561
|
+
"serde",
|
|
405
562
|
"smallvec",
|
|
563
|
+
"tempfile",
|
|
406
564
|
"thiserror",
|
|
407
565
|
]
|
|
408
566
|
|
|
409
567
|
[[package]]
|
|
410
568
|
name = "polyxml-c"
|
|
411
|
-
version = "0.
|
|
569
|
+
version = "0.12.0"
|
|
412
570
|
dependencies = [
|
|
413
571
|
"polyxml",
|
|
414
572
|
]
|
|
415
573
|
|
|
574
|
+
[[package]]
|
|
575
|
+
name = "polyxml-cli"
|
|
576
|
+
version = "0.12.0"
|
|
577
|
+
dependencies = [
|
|
578
|
+
"clap",
|
|
579
|
+
"glob",
|
|
580
|
+
"heck",
|
|
581
|
+
"polyxml",
|
|
582
|
+
"serde",
|
|
583
|
+
"tempfile",
|
|
584
|
+
"thiserror",
|
|
585
|
+
"toml",
|
|
586
|
+
]
|
|
587
|
+
|
|
416
588
|
[[package]]
|
|
417
589
|
name = "polyxml-js"
|
|
418
|
-
version = "0.
|
|
590
|
+
version = "0.12.0"
|
|
419
591
|
dependencies = [
|
|
420
592
|
"napi",
|
|
421
593
|
"napi-build",
|
|
@@ -425,7 +597,7 @@ dependencies = [
|
|
|
425
597
|
|
|
426
598
|
[[package]]
|
|
427
599
|
name = "polyxml-python"
|
|
428
|
-
version = "0.
|
|
600
|
+
version = "0.12.0"
|
|
429
601
|
dependencies = [
|
|
430
602
|
"lexical-core",
|
|
431
603
|
"polyxml",
|
|
@@ -534,6 +706,12 @@ dependencies = [
|
|
|
534
706
|
"proc-macro2",
|
|
535
707
|
]
|
|
536
708
|
|
|
709
|
+
[[package]]
|
|
710
|
+
name = "r-efi"
|
|
711
|
+
version = "6.0.0"
|
|
712
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
713
|
+
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
714
|
+
|
|
537
715
|
[[package]]
|
|
538
716
|
name = "regex"
|
|
539
717
|
version = "1.13.1"
|
|
@@ -563,6 +741,19 @@ version = "0.8.11"
|
|
|
563
741
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
564
742
|
checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
|
565
743
|
|
|
744
|
+
[[package]]
|
|
745
|
+
name = "rustix"
|
|
746
|
+
version = "1.1.5"
|
|
747
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
748
|
+
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
|
749
|
+
dependencies = [
|
|
750
|
+
"bitflags",
|
|
751
|
+
"errno",
|
|
752
|
+
"libc",
|
|
753
|
+
"linux-raw-sys",
|
|
754
|
+
"windows-sys",
|
|
755
|
+
]
|
|
756
|
+
|
|
566
757
|
[[package]]
|
|
567
758
|
name = "same-file"
|
|
568
759
|
version = "1.0.6"
|
|
@@ -621,6 +812,15 @@ dependencies = [
|
|
|
621
812
|
"zmij",
|
|
622
813
|
]
|
|
623
814
|
|
|
815
|
+
[[package]]
|
|
816
|
+
name = "serde_spanned"
|
|
817
|
+
version = "0.6.9"
|
|
818
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
819
|
+
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
|
|
820
|
+
dependencies = [
|
|
821
|
+
"serde",
|
|
822
|
+
]
|
|
823
|
+
|
|
624
824
|
[[package]]
|
|
625
825
|
name = "shlex"
|
|
626
826
|
version = "2.0.1"
|
|
@@ -633,6 +833,12 @@ version = "1.16.1"
|
|
|
633
833
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
634
834
|
checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891"
|
|
635
835
|
|
|
836
|
+
[[package]]
|
|
837
|
+
name = "strsim"
|
|
838
|
+
version = "0.11.1"
|
|
839
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
840
|
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
841
|
+
|
|
636
842
|
[[package]]
|
|
637
843
|
name = "syn"
|
|
638
844
|
version = "2.0.119"
|
|
@@ -661,6 +867,19 @@ version = "0.13.5"
|
|
|
661
867
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
662
868
|
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
663
869
|
|
|
870
|
+
[[package]]
|
|
871
|
+
name = "tempfile"
|
|
872
|
+
version = "3.27.0"
|
|
873
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
874
|
+
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
875
|
+
dependencies = [
|
|
876
|
+
"fastrand",
|
|
877
|
+
"getrandom",
|
|
878
|
+
"once_cell",
|
|
879
|
+
"rustix",
|
|
880
|
+
"windows-sys",
|
|
881
|
+
]
|
|
882
|
+
|
|
664
883
|
[[package]]
|
|
665
884
|
name = "thiserror"
|
|
666
885
|
version = "2.0.20"
|
|
@@ -691,6 +910,47 @@ dependencies = [
|
|
|
691
910
|
"serde_json",
|
|
692
911
|
]
|
|
693
912
|
|
|
913
|
+
[[package]]
|
|
914
|
+
name = "toml"
|
|
915
|
+
version = "0.8.23"
|
|
916
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
917
|
+
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
|
|
918
|
+
dependencies = [
|
|
919
|
+
"serde",
|
|
920
|
+
"serde_spanned",
|
|
921
|
+
"toml_datetime",
|
|
922
|
+
"toml_edit",
|
|
923
|
+
]
|
|
924
|
+
|
|
925
|
+
[[package]]
|
|
926
|
+
name = "toml_datetime"
|
|
927
|
+
version = "0.6.11"
|
|
928
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
929
|
+
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
|
|
930
|
+
dependencies = [
|
|
931
|
+
"serde",
|
|
932
|
+
]
|
|
933
|
+
|
|
934
|
+
[[package]]
|
|
935
|
+
name = "toml_edit"
|
|
936
|
+
version = "0.22.27"
|
|
937
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
938
|
+
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
|
|
939
|
+
dependencies = [
|
|
940
|
+
"indexmap",
|
|
941
|
+
"serde",
|
|
942
|
+
"serde_spanned",
|
|
943
|
+
"toml_datetime",
|
|
944
|
+
"toml_write",
|
|
945
|
+
"winnow",
|
|
946
|
+
]
|
|
947
|
+
|
|
948
|
+
[[package]]
|
|
949
|
+
name = "toml_write"
|
|
950
|
+
version = "0.1.2"
|
|
951
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
952
|
+
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
|
|
953
|
+
|
|
694
954
|
[[package]]
|
|
695
955
|
name = "unicode-ident"
|
|
696
956
|
version = "1.0.24"
|
|
@@ -703,6 +963,12 @@ version = "1.13.3"
|
|
|
703
963
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
704
964
|
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
|
705
965
|
|
|
966
|
+
[[package]]
|
|
967
|
+
name = "utf8parse"
|
|
968
|
+
version = "0.2.2"
|
|
969
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
970
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
971
|
+
|
|
706
972
|
[[package]]
|
|
707
973
|
name = "walkdir"
|
|
708
974
|
version = "2.5.0"
|
|
@@ -759,6 +1025,15 @@ dependencies = [
|
|
|
759
1025
|
"windows-link",
|
|
760
1026
|
]
|
|
761
1027
|
|
|
1028
|
+
[[package]]
|
|
1029
|
+
name = "winnow"
|
|
1030
|
+
version = "0.7.15"
|
|
1031
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1032
|
+
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
1033
|
+
dependencies = [
|
|
1034
|
+
"memchr",
|
|
1035
|
+
]
|
|
1036
|
+
|
|
762
1037
|
[[package]]
|
|
763
1038
|
name = "yansi"
|
|
764
1039
|
version = "1.0.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyxml
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.13
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
12
13
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
13
14
|
Classifier: Topic :: Text Processing :: Markup :: XML
|
|
14
15
|
Classifier: Typing :: Typed
|
|
@@ -49,11 +50,13 @@ Powered by `polyxml-core` written in Rust and PyO3 (`abi3-py312`).
|
|
|
49
50
|
from dataclasses import dataclass, field
|
|
50
51
|
import polyxml
|
|
51
52
|
|
|
53
|
+
|
|
52
54
|
@dataclass
|
|
53
55
|
class Item:
|
|
54
56
|
id: int = field(metadata={"type": "Attribute"})
|
|
55
57
|
name: str = field(metadata={"type": "Element"})
|
|
56
58
|
|
|
59
|
+
|
|
57
60
|
# 1. XML Deserialization
|
|
58
61
|
item = polyxml.deserialize(b'<Item id="1"><name>Gadget</name></Item>', Item)
|
|
59
62
|
|
|
@@ -17,11 +17,13 @@ Powered by `polyxml-core` written in Rust and PyO3 (`abi3-py312`).
|
|
|
17
17
|
from dataclasses import dataclass, field
|
|
18
18
|
import polyxml
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
@dataclass
|
|
21
22
|
class Item:
|
|
22
23
|
id: int = field(metadata={"type": "Attribute"})
|
|
23
24
|
name: str = field(metadata={"type": "Element"})
|
|
24
25
|
|
|
26
|
+
|
|
25
27
|
# 1. XML Deserialization
|
|
26
28
|
item = polyxml.deserialize(b'<Item id="1"><name>Gadget</name></Item>', Item)
|
|
27
29
|
|
|
@@ -16,10 +16,14 @@ lexical-core = "1.0"
|
|
|
16
16
|
memchr = "2.8"
|
|
17
17
|
thiserror = "2.0"
|
|
18
18
|
smallvec = "1.16"
|
|
19
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
20
|
+
minijinja = { version = "2.8", features = ["builtins"] }
|
|
21
|
+
heck = "0.5"
|
|
19
22
|
|
|
20
23
|
[dev-dependencies]
|
|
21
24
|
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
|
|
22
25
|
pretty_assertions = "1.4"
|
|
26
|
+
tempfile = "3"
|
|
23
27
|
|
|
24
28
|
[[bench]]
|
|
25
29
|
name = "core_benchmarks"
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
[](https://docs.rs/polyxml)
|
|
5
5
|
[](https://github.com/nth-bailey/PolyXML/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
**PolyXML** is a high-performance
|
|
7
|
+
**PolyXML** is a high-performance streaming XML data-binding engine and polyglot schema compiler built in Rust. It serves as the foundational native core powering the `polyxml` CLI and language bindings across Python, C/C++, Java, TypeScript, Go, and C#.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- **High
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
13
|
+
- **High-Throughput Streaming Engine**: Built on top of [`quick-xml`](https://crates.io/crates/quick-xml) and [`lexical-core`](https://crates.io/crates/lexical-core) for fast, zero-copy byte slice parsing.
|
|
14
|
+
- **Pure-Rust XSD 1.0 & 1.1 Schema Parser**: Parses complex schemas with full support for includes, imports, redefines, choice groups, and restriction facets with zero C dependencies.
|
|
15
|
+
- **Language-Agnostic Schema IR**: Normalizes XML Schema constructs into an actionable, unified Intermediate Representation (`SchemaIR`).
|
|
16
|
+
- **Tarjan SCC Cycle Analysis**: Automatically breaks recursive and mutually cyclic type references with minimal cut points (`Box<T>`, pointers, `std::unique_ptr`, `z.lazy`).
|
|
17
|
+
- **7-Target Code Generator**: Emits idiomatic models and streaming codecs for **Rust**, **Python** (dataclasses & Pydantic v2), **C++20**, **Java 21+**, **TypeScript 5+**, **Go 1.22+**, and **C# 12 / .NET 8+**.
|
|
18
|
+
- **Bidirectional Streaming Codecs**: Fast streaming deserialization and serialization with optional indentation formatting and namespace mapping.
|
|
16
19
|
- **Security Hardened**: Built-in recursion depth limits protect against XML entity expansion and deeply nested denial-of-service (Billion Laughs) attacks.
|
|
17
20
|
- **Zero Heavy Allocations**: Uses `smallvec` and slice lookups to minimize intermediate heap allocations.
|
|
18
21
|
|
|
@@ -111,6 +114,25 @@ let order_schema = ModelSchema::builder("Order")
|
|
|
111
114
|
|
|
112
115
|
---
|
|
113
116
|
|
|
117
|
+
## Schema Parsing & Codegen API
|
|
118
|
+
|
|
119
|
+
In addition to dynamic schemas, `polyxml` can parse XSD files directly and emit typed models across languages:
|
|
120
|
+
|
|
121
|
+
```rust
|
|
122
|
+
use polyxml::schema_parser::SchemaParser;
|
|
123
|
+
use polyxml::codegen::{rust::RustOptions, python::PythonOptions};
|
|
124
|
+
|
|
125
|
+
// 1. Parse an XML Schema into language-agnostic IR
|
|
126
|
+
let mut parser = SchemaParser::new();
|
|
127
|
+
let schema_ir = parser.parse_file("schemas/order.xsd")?;
|
|
128
|
+
|
|
129
|
+
// 2. Generate code for target ecosystems
|
|
130
|
+
let rust_code = polyxml::codegen::rust::generate(&schema_ir, &RustOptions::default())?;
|
|
131
|
+
let py_code = polyxml::codegen::python::generate(&schema_ir, &PythonOptions::default())?;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
114
136
|
## Security Limits
|
|
115
137
|
|
|
116
138
|
To defend against deeply nested payloads or XML entity expansion denial-of-service, specify a recursion depth limit:
|