polyxml 0.11.1__tar.gz → 0.13.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.13.0}/Cargo.lock +280 -4
- {polyxml-0.11.1 → polyxml-0.13.0}/Cargo.toml +1 -1
- {polyxml-0.11.1 → polyxml-0.13.0}/PKG-INFO +4 -1
- {polyxml-0.11.1/crates/polyxml-python → polyxml-0.13.0}/README.md +2 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/Cargo.toml +5 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/README.md +26 -4
- polyxml-0.13.0/crates/polyxml-core/src/codegen/cpp/mod.rs +906 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/csharp/mod.rs +781 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/go/mod.rs +733 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/java/mod.rs +689 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/mod.rs +553 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/python/mod.rs +796 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/rust/mod.rs +1932 -0
- polyxml-0.13.0/crates/polyxml-core/src/codegen/typescript/mod.rs +681 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/error.rs +16 -0
- polyxml-0.13.0/crates/polyxml-core/src/ir/mod.rs +475 -0
- polyxml-0.13.0/crates/polyxml-core/src/ir/tarjan.rs +201 -0
- polyxml-0.13.0/crates/polyxml-core/src/json.rs +356 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/lib.rs +5 -0
- polyxml-0.13.0/crates/polyxml-core/src/schema_parser/mod.rs +916 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/value.rs +23 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_cpp_codegen.rs +864 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_csharp_codegen.rs +620 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_go_codegen.rs +512 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_java_codegen.rs +329 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_json.rs +223 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_python_codegen.rs +399 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_rust_codecs.rs +560 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_rust_codegen.rs +437 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_schema_ir.rs +427 -0
- polyxml-0.13.0/crates/polyxml-core/tests/test_ts_codegen.rs +366 -0
- {polyxml-0.11.1 → polyxml-0.13.0/crates/polyxml-python}/README.md +2 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-python/src/lib.rs +58 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-python/tests/test_conformance.py +64 -14
- polyxml-0.13.0/crates/polyxml-python/tests/test_generated_models.py +369 -0
- polyxml-0.13.0/crates/polyxml-python/tests/test_json.py +275 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-python/tests/test_polyxml.py +2 -2
- {polyxml-0.11.1 → polyxml-0.13.0}/pyproject.toml +2 -1
- {polyxml-0.11.1 → polyxml-0.13.0}/python/polyxml/__init__.py +159 -1
- polyxml-0.13.0/python/polyxml/compat/__init__.py +1 -0
- polyxml-0.13.0/python/polyxml/compat/xsdata.py +36 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/converters.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/parser.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/schema.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/src/serializer.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/tests/test_conformance.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/tests/test_core.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-core/tests/test_security.rs +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/crates/polyxml-python/Cargo.toml +0 -0
- {polyxml-0.11.1 → polyxml-0.13.0}/python/polyxml/AGENT_GUIDE.md +0 -0
- {polyxml-0.11.1 → polyxml-0.13.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,46 @@ dependencies = [
|
|
|
395
549
|
|
|
396
550
|
[[package]]
|
|
397
551
|
name = "polyxml"
|
|
398
|
-
version = "0.
|
|
552
|
+
version = "0.13.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",
|
|
562
|
+
"serde_json",
|
|
405
563
|
"smallvec",
|
|
564
|
+
"tempfile",
|
|
406
565
|
"thiserror",
|
|
407
566
|
]
|
|
408
567
|
|
|
409
568
|
[[package]]
|
|
410
569
|
name = "polyxml-c"
|
|
411
|
-
version = "0.
|
|
570
|
+
version = "0.13.0"
|
|
412
571
|
dependencies = [
|
|
413
572
|
"polyxml",
|
|
414
573
|
]
|
|
415
574
|
|
|
575
|
+
[[package]]
|
|
576
|
+
name = "polyxml-cli"
|
|
577
|
+
version = "0.13.0"
|
|
578
|
+
dependencies = [
|
|
579
|
+
"clap",
|
|
580
|
+
"glob",
|
|
581
|
+
"heck",
|
|
582
|
+
"polyxml",
|
|
583
|
+
"serde",
|
|
584
|
+
"tempfile",
|
|
585
|
+
"thiserror",
|
|
586
|
+
"toml",
|
|
587
|
+
]
|
|
588
|
+
|
|
416
589
|
[[package]]
|
|
417
590
|
name = "polyxml-js"
|
|
418
|
-
version = "0.
|
|
591
|
+
version = "0.13.0"
|
|
419
592
|
dependencies = [
|
|
420
593
|
"napi",
|
|
421
594
|
"napi-build",
|
|
@@ -425,7 +598,7 @@ dependencies = [
|
|
|
425
598
|
|
|
426
599
|
[[package]]
|
|
427
600
|
name = "polyxml-python"
|
|
428
|
-
version = "0.
|
|
601
|
+
version = "0.13.0"
|
|
429
602
|
dependencies = [
|
|
430
603
|
"lexical-core",
|
|
431
604
|
"polyxml",
|
|
@@ -534,6 +707,12 @@ dependencies = [
|
|
|
534
707
|
"proc-macro2",
|
|
535
708
|
]
|
|
536
709
|
|
|
710
|
+
[[package]]
|
|
711
|
+
name = "r-efi"
|
|
712
|
+
version = "6.0.0"
|
|
713
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
714
|
+
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
715
|
+
|
|
537
716
|
[[package]]
|
|
538
717
|
name = "regex"
|
|
539
718
|
version = "1.13.1"
|
|
@@ -563,6 +742,19 @@ version = "0.8.11"
|
|
|
563
742
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
564
743
|
checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
|
565
744
|
|
|
745
|
+
[[package]]
|
|
746
|
+
name = "rustix"
|
|
747
|
+
version = "1.1.5"
|
|
748
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
749
|
+
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
|
750
|
+
dependencies = [
|
|
751
|
+
"bitflags",
|
|
752
|
+
"errno",
|
|
753
|
+
"libc",
|
|
754
|
+
"linux-raw-sys",
|
|
755
|
+
"windows-sys",
|
|
756
|
+
]
|
|
757
|
+
|
|
566
758
|
[[package]]
|
|
567
759
|
name = "same-file"
|
|
568
760
|
version = "1.0.6"
|
|
@@ -621,6 +813,15 @@ dependencies = [
|
|
|
621
813
|
"zmij",
|
|
622
814
|
]
|
|
623
815
|
|
|
816
|
+
[[package]]
|
|
817
|
+
name = "serde_spanned"
|
|
818
|
+
version = "0.6.9"
|
|
819
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
820
|
+
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
|
|
821
|
+
dependencies = [
|
|
822
|
+
"serde",
|
|
823
|
+
]
|
|
824
|
+
|
|
624
825
|
[[package]]
|
|
625
826
|
name = "shlex"
|
|
626
827
|
version = "2.0.1"
|
|
@@ -633,6 +834,12 @@ version = "1.16.1"
|
|
|
633
834
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
634
835
|
checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891"
|
|
635
836
|
|
|
837
|
+
[[package]]
|
|
838
|
+
name = "strsim"
|
|
839
|
+
version = "0.11.1"
|
|
840
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
841
|
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
842
|
+
|
|
636
843
|
[[package]]
|
|
637
844
|
name = "syn"
|
|
638
845
|
version = "2.0.119"
|
|
@@ -661,6 +868,19 @@ version = "0.13.5"
|
|
|
661
868
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
662
869
|
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
663
870
|
|
|
871
|
+
[[package]]
|
|
872
|
+
name = "tempfile"
|
|
873
|
+
version = "3.27.0"
|
|
874
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
875
|
+
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
876
|
+
dependencies = [
|
|
877
|
+
"fastrand",
|
|
878
|
+
"getrandom",
|
|
879
|
+
"once_cell",
|
|
880
|
+
"rustix",
|
|
881
|
+
"windows-sys",
|
|
882
|
+
]
|
|
883
|
+
|
|
664
884
|
[[package]]
|
|
665
885
|
name = "thiserror"
|
|
666
886
|
version = "2.0.20"
|
|
@@ -691,6 +911,47 @@ dependencies = [
|
|
|
691
911
|
"serde_json",
|
|
692
912
|
]
|
|
693
913
|
|
|
914
|
+
[[package]]
|
|
915
|
+
name = "toml"
|
|
916
|
+
version = "0.8.23"
|
|
917
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
918
|
+
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
|
|
919
|
+
dependencies = [
|
|
920
|
+
"serde",
|
|
921
|
+
"serde_spanned",
|
|
922
|
+
"toml_datetime",
|
|
923
|
+
"toml_edit",
|
|
924
|
+
]
|
|
925
|
+
|
|
926
|
+
[[package]]
|
|
927
|
+
name = "toml_datetime"
|
|
928
|
+
version = "0.6.11"
|
|
929
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
930
|
+
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
|
|
931
|
+
dependencies = [
|
|
932
|
+
"serde",
|
|
933
|
+
]
|
|
934
|
+
|
|
935
|
+
[[package]]
|
|
936
|
+
name = "toml_edit"
|
|
937
|
+
version = "0.22.27"
|
|
938
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
939
|
+
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
|
|
940
|
+
dependencies = [
|
|
941
|
+
"indexmap",
|
|
942
|
+
"serde",
|
|
943
|
+
"serde_spanned",
|
|
944
|
+
"toml_datetime",
|
|
945
|
+
"toml_write",
|
|
946
|
+
"winnow",
|
|
947
|
+
]
|
|
948
|
+
|
|
949
|
+
[[package]]
|
|
950
|
+
name = "toml_write"
|
|
951
|
+
version = "0.1.2"
|
|
952
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
953
|
+
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
|
|
954
|
+
|
|
694
955
|
[[package]]
|
|
695
956
|
name = "unicode-ident"
|
|
696
957
|
version = "1.0.24"
|
|
@@ -703,6 +964,12 @@ version = "1.13.3"
|
|
|
703
964
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
704
965
|
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
|
705
966
|
|
|
967
|
+
[[package]]
|
|
968
|
+
name = "utf8parse"
|
|
969
|
+
version = "0.2.2"
|
|
970
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
971
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
972
|
+
|
|
706
973
|
[[package]]
|
|
707
974
|
name = "walkdir"
|
|
708
975
|
version = "2.5.0"
|
|
@@ -759,6 +1026,15 @@ dependencies = [
|
|
|
759
1026
|
"windows-link",
|
|
760
1027
|
]
|
|
761
1028
|
|
|
1029
|
+
[[package]]
|
|
1030
|
+
name = "winnow"
|
|
1031
|
+
version = "0.7.15"
|
|
1032
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1033
|
+
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
1034
|
+
dependencies = [
|
|
1035
|
+
"memchr",
|
|
1036
|
+
]
|
|
1037
|
+
|
|
762
1038
|
[[package]]
|
|
763
1039
|
name = "yansi"
|
|
764
1040
|
version = "1.0.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyxml
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.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,15 @@ 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
|
+
serde_json = "1.0"
|
|
21
|
+
minijinja = { version = "2.8", features = ["builtins"] }
|
|
22
|
+
heck = "0.5"
|
|
19
23
|
|
|
20
24
|
[dev-dependencies]
|
|
21
25
|
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
|
|
22
26
|
pretty_assertions = "1.4"
|
|
27
|
+
tempfile = "3"
|
|
23
28
|
|
|
24
29
|
[[bench]]
|
|
25
30
|
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:
|