iscc-lib 0.3.0__tar.gz → 0.4.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.
Files changed (31) hide show
  1. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/Cargo.lock +395 -7
  2. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/Cargo.toml +2 -1
  3. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/PKG-INFO +1 -1
  4. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/CLAUDE.md +21 -12
  5. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-py/CLAUDE.md +34 -22
  6. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/README.md +0 -0
  7. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/Cargo.toml +0 -0
  8. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/README.md +0 -0
  9. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/benches/benchmarks.rs +0 -0
  10. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/cdc.rs +0 -0
  11. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/codec.rs +0 -0
  12. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/conformance.rs +0 -0
  13. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/dct.rs +0 -0
  14. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/lib.rs +0 -0
  15. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/minhash.rs +0 -0
  16. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/simhash.rs +0 -0
  17. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/streaming.rs +0 -0
  18. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/types.rs +0 -0
  19. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/utils.rs +0 -0
  20. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/src/wtahash.rs +0 -0
  21. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/tests/data.json +0 -0
  22. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/tests/test_algorithm_primitives.rs +0 -0
  23. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-lib/tests/test_text_utils.rs +0 -0
  24. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-py/Cargo.toml +0 -0
  25. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-py/README.md +0 -0
  26. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-py/src/lib.rs +0 -0
  27. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/crates/iscc-py/uv.lock +0 -0
  28. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/pyproject.toml +0 -0
  29. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/python/iscc_lib/__init__.py +0 -0
  30. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/python/iscc_lib/_lowlevel.pyi +0 -0
  31. {iscc_lib-0.3.0 → iscc_lib-0.4.0}/python/iscc_lib/py.typed +0 -0
@@ -41,6 +41,48 @@ version = "0.7.6"
41
41
  source = "registry+https://github.com/rust-lang/crates.io-index"
42
42
  checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
43
43
 
44
+ [[package]]
45
+ name = "askama"
46
+ version = "0.14.0"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"
49
+ dependencies = [
50
+ "askama_derive",
51
+ "itoa",
52
+ "percent-encoding",
53
+ "serde",
54
+ "serde_json",
55
+ ]
56
+
57
+ [[package]]
58
+ name = "askama_derive"
59
+ version = "0.14.0"
60
+ source = "registry+https://github.com/rust-lang/crates.io-index"
61
+ checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"
62
+ dependencies = [
63
+ "askama_parser",
64
+ "basic-toml",
65
+ "memchr",
66
+ "proc-macro2",
67
+ "quote",
68
+ "rustc-hash 2.1.1",
69
+ "serde",
70
+ "serde_derive",
71
+ "syn",
72
+ ]
73
+
74
+ [[package]]
75
+ name = "askama_parser"
76
+ version = "0.14.0"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"
79
+ dependencies = [
80
+ "memchr",
81
+ "serde",
82
+ "serde_derive",
83
+ "winnow 0.7.15",
84
+ ]
85
+
44
86
  [[package]]
45
87
  name = "async-trait"
46
88
  version = "0.1.89"
@@ -58,6 +100,15 @@ version = "1.5.0"
58
100
  source = "registry+https://github.com/rust-lang/crates.io-index"
59
101
  checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
60
102
 
103
+ [[package]]
104
+ name = "basic-toml"
105
+ version = "0.1.10"
106
+ source = "registry+https://github.com/rust-lang/crates.io-index"
107
+ checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"
108
+ dependencies = [
109
+ "serde",
110
+ ]
111
+
61
112
  [[package]]
62
113
  name = "bindgen"
63
114
  version = "0.69.5"
@@ -110,6 +161,38 @@ version = "1.11.1"
110
161
  source = "registry+https://github.com/rust-lang/crates.io-index"
111
162
  checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
112
163
 
164
+ [[package]]
165
+ name = "camino"
166
+ version = "1.2.2"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48"
169
+ dependencies = [
170
+ "serde_core",
171
+ ]
172
+
173
+ [[package]]
174
+ name = "cargo-platform"
175
+ version = "0.1.9"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
178
+ dependencies = [
179
+ "serde",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "cargo_metadata"
184
+ version = "0.19.2"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
187
+ dependencies = [
188
+ "camino",
189
+ "cargo-platform",
190
+ "semver",
191
+ "serde",
192
+ "serde_json",
193
+ "thiserror 2.0.18",
194
+ ]
195
+
113
196
  [[package]]
114
197
  name = "cast"
115
198
  version = "0.3.0"
@@ -192,6 +275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
192
275
  checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
193
276
  dependencies = [
194
277
  "clap_builder",
278
+ "clap_derive",
195
279
  ]
196
280
 
197
281
  [[package]]
@@ -202,6 +286,19 @@ checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
202
286
  dependencies = [
203
287
  "anstyle",
204
288
  "clap_lex",
289
+ "strsim",
290
+ ]
291
+
292
+ [[package]]
293
+ name = "clap_derive"
294
+ version = "4.5.55"
295
+ source = "registry+https://github.com/rust-lang/crates.io-index"
296
+ checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
297
+ dependencies = [
298
+ "heck",
299
+ "proc-macro2",
300
+ "quote",
301
+ "syn",
205
302
  ]
206
303
 
207
304
  [[package]]
@@ -398,6 +495,15 @@ version = "0.1.5"
398
495
  source = "registry+https://github.com/rust-lang/crates.io-index"
399
496
  checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
400
497
 
498
+ [[package]]
499
+ name = "fs-err"
500
+ version = "2.11.0"
501
+ source = "registry+https://github.com/rust-lang/crates.io-index"
502
+ checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"
503
+ dependencies = [
504
+ "autocfg",
505
+ ]
506
+
401
507
  [[package]]
402
508
  name = "futures"
403
509
  version = "0.3.32"
@@ -505,6 +611,17 @@ version = "0.3.3"
505
611
  source = "registry+https://github.com/rust-lang/crates.io-index"
506
612
  checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
507
613
 
614
+ [[package]]
615
+ name = "goblin"
616
+ version = "0.8.2"
617
+ source = "registry+https://github.com/rust-lang/crates.io-index"
618
+ checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47"
619
+ dependencies = [
620
+ "log",
621
+ "plain",
622
+ "scroll",
623
+ ]
624
+
508
625
  [[package]]
509
626
  name = "half"
510
627
  version = "2.7.1"
@@ -589,7 +706,7 @@ dependencies = [
589
706
 
590
707
  [[package]]
591
708
  name = "iscc-ffi"
592
- version = "0.3.0"
709
+ version = "0.4.0"
593
710
  dependencies = [
594
711
  "csbindgen",
595
712
  "iscc-lib",
@@ -597,7 +714,7 @@ dependencies = [
597
714
 
598
715
  [[package]]
599
716
  name = "iscc-jni"
600
- version = "0.3.0"
717
+ version = "0.4.0"
601
718
  dependencies = [
602
719
  "iscc-lib",
603
720
  "jni",
@@ -605,7 +722,7 @@ dependencies = [
605
722
 
606
723
  [[package]]
607
724
  name = "iscc-lib"
608
- version = "0.3.0"
725
+ version = "0.4.0"
609
726
  dependencies = [
610
727
  "blake3",
611
728
  "criterion",
@@ -623,7 +740,7 @@ dependencies = [
623
740
 
624
741
  [[package]]
625
742
  name = "iscc-napi"
626
- version = "0.3.0"
743
+ version = "0.4.0"
627
744
  dependencies = [
628
745
  "iscc-lib",
629
746
  "napi",
@@ -633,7 +750,7 @@ dependencies = [
633
750
 
634
751
  [[package]]
635
752
  name = "iscc-py"
636
- version = "0.3.0"
753
+ version = "0.4.0"
637
754
  dependencies = [
638
755
  "iscc-lib",
639
756
  "pyo3",
@@ -641,15 +758,24 @@ dependencies = [
641
758
 
642
759
  [[package]]
643
760
  name = "iscc-rb"
644
- version = "0.3.0"
761
+ version = "0.4.0"
645
762
  dependencies = [
646
763
  "iscc-lib",
647
764
  "magnus",
648
765
  ]
649
766
 
767
+ [[package]]
768
+ name = "iscc-uniffi"
769
+ version = "0.4.0"
770
+ dependencies = [
771
+ "iscc-lib",
772
+ "thiserror 2.0.18",
773
+ "uniffi",
774
+ ]
775
+
650
776
  [[package]]
651
777
  name = "iscc-wasm"
652
- version = "0.3.0"
778
+ version = "0.4.0"
653
779
  dependencies = [
654
780
  "hex",
655
781
  "iscc-lib",
@@ -927,12 +1053,24 @@ version = "11.1.5"
927
1053
  source = "registry+https://github.com/rust-lang/crates.io-index"
928
1054
  checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
929
1055
 
1056
+ [[package]]
1057
+ name = "percent-encoding"
1058
+ version = "2.3.2"
1059
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1060
+ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
1061
+
930
1062
  [[package]]
931
1063
  name = "pin-project-lite"
932
1064
  version = "0.2.16"
933
1065
  source = "registry+https://github.com/rust-lang/crates.io-index"
934
1066
  checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
935
1067
 
1068
+ [[package]]
1069
+ name = "plain"
1070
+ version = "0.2.3"
1071
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1072
+ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
1073
+
936
1074
  [[package]]
937
1075
  name = "plotters"
938
1076
  version = "0.3.7"
@@ -1189,11 +1327,35 @@ dependencies = [
1189
1327
  "winapi-util",
1190
1328
  ]
1191
1329
 
1330
+ [[package]]
1331
+ name = "scroll"
1332
+ version = "0.12.0"
1333
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1334
+ checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6"
1335
+ dependencies = [
1336
+ "scroll_derive",
1337
+ ]
1338
+
1339
+ [[package]]
1340
+ name = "scroll_derive"
1341
+ version = "0.12.1"
1342
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1343
+ checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d"
1344
+ dependencies = [
1345
+ "proc-macro2",
1346
+ "quote",
1347
+ "syn",
1348
+ ]
1349
+
1192
1350
  [[package]]
1193
1351
  name = "semver"
1194
1352
  version = "1.0.27"
1195
1353
  source = "registry+https://github.com/rust-lang/crates.io-index"
1196
1354
  checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
1355
+ dependencies = [
1356
+ "serde",
1357
+ "serde_core",
1358
+ ]
1197
1359
 
1198
1360
  [[package]]
1199
1361
  name = "seq-macro"
@@ -1266,6 +1428,15 @@ dependencies = [
1266
1428
  "serde_json",
1267
1429
  ]
1268
1430
 
1431
+ [[package]]
1432
+ name = "serde_spanned"
1433
+ version = "1.0.4"
1434
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1435
+ checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
1436
+ dependencies = [
1437
+ "serde_core",
1438
+ ]
1439
+
1269
1440
  [[package]]
1270
1441
  name = "shell-words"
1271
1442
  version = "1.1.1"
@@ -1278,12 +1449,36 @@ version = "1.3.0"
1278
1449
  source = "registry+https://github.com/rust-lang/crates.io-index"
1279
1450
  checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
1280
1451
 
1452
+ [[package]]
1453
+ name = "siphasher"
1454
+ version = "1.0.2"
1455
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1456
+ checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
1457
+
1281
1458
  [[package]]
1282
1459
  name = "slab"
1283
1460
  version = "0.4.12"
1284
1461
  source = "registry+https://github.com/rust-lang/crates.io-index"
1285
1462
  checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
1286
1463
 
1464
+ [[package]]
1465
+ name = "smawk"
1466
+ version = "0.3.2"
1467
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1468
+ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
1469
+
1470
+ [[package]]
1471
+ name = "static_assertions"
1472
+ version = "1.1.0"
1473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1474
+ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1475
+
1476
+ [[package]]
1477
+ name = "strsim"
1478
+ version = "0.11.1"
1479
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1480
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
1481
+
1287
1482
  [[package]]
1288
1483
  name = "syn"
1289
1484
  version = "2.0.117"
@@ -1314,6 +1509,15 @@ dependencies = [
1314
1509
  "windows-sys 0.61.2",
1315
1510
  ]
1316
1511
 
1512
+ [[package]]
1513
+ name = "textwrap"
1514
+ version = "0.16.2"
1515
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1516
+ checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
1517
+ dependencies = [
1518
+ "smawk",
1519
+ ]
1520
+
1317
1521
  [[package]]
1318
1522
  name = "thiserror"
1319
1523
  version = "1.0.69"
@@ -1379,6 +1583,45 @@ version = "0.1.1"
1379
1583
  source = "registry+https://github.com/rust-lang/crates.io-index"
1380
1584
  checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1381
1585
 
1586
+ [[package]]
1587
+ name = "toml"
1588
+ version = "0.9.12+spec-1.1.0"
1589
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1590
+ checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
1591
+ dependencies = [
1592
+ "indexmap",
1593
+ "serde_core",
1594
+ "serde_spanned",
1595
+ "toml_datetime",
1596
+ "toml_parser",
1597
+ "toml_writer",
1598
+ "winnow 0.7.15",
1599
+ ]
1600
+
1601
+ [[package]]
1602
+ name = "toml_datetime"
1603
+ version = "0.7.5+spec-1.1.0"
1604
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1605
+ checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
1606
+ dependencies = [
1607
+ "serde_core",
1608
+ ]
1609
+
1610
+ [[package]]
1611
+ name = "toml_parser"
1612
+ version = "1.0.10+spec-1.1.0"
1613
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1614
+ checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420"
1615
+ dependencies = [
1616
+ "winnow 1.0.0",
1617
+ ]
1618
+
1619
+ [[package]]
1620
+ name = "toml_writer"
1621
+ version = "1.0.7+spec-1.1.0"
1622
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1623
+ checksum = "f17aaa1c6e3dc22b1da4b6bba97d066e354c7945cac2f7852d4e4e7ca7a6b56d"
1624
+
1382
1625
  [[package]]
1383
1626
  name = "unicode-general-category"
1384
1627
  version = "1.1.0"
@@ -1412,6 +1655,127 @@ version = "0.2.6"
1412
1655
  source = "registry+https://github.com/rust-lang/crates.io-index"
1413
1656
  checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
1414
1657
 
1658
+ [[package]]
1659
+ name = "uniffi"
1660
+ version = "0.31.0"
1661
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1662
+ checksum = "b8c6dec3fc6645f71a16a3fa9ff57991028153bd194ca97f4b55e610c73ce66a"
1663
+ dependencies = [
1664
+ "anyhow",
1665
+ "camino",
1666
+ "cargo_metadata",
1667
+ "clap",
1668
+ "uniffi_bindgen",
1669
+ "uniffi_core",
1670
+ "uniffi_macros",
1671
+ "uniffi_pipeline",
1672
+ ]
1673
+
1674
+ [[package]]
1675
+ name = "uniffi_bindgen"
1676
+ version = "0.31.0"
1677
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1678
+ checksum = "4ed0150801958d4825da56a41c71f000a457ac3a4613fa9647df78ac4b6b6881"
1679
+ dependencies = [
1680
+ "anyhow",
1681
+ "askama",
1682
+ "camino",
1683
+ "cargo_metadata",
1684
+ "fs-err",
1685
+ "glob",
1686
+ "goblin",
1687
+ "heck",
1688
+ "indexmap",
1689
+ "once_cell",
1690
+ "serde",
1691
+ "tempfile",
1692
+ "textwrap",
1693
+ "toml",
1694
+ "uniffi_internal_macros",
1695
+ "uniffi_meta",
1696
+ "uniffi_pipeline",
1697
+ "uniffi_udl",
1698
+ ]
1699
+
1700
+ [[package]]
1701
+ name = "uniffi_core"
1702
+ version = "0.31.0"
1703
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1704
+ checksum = "b0ef62e69762fbb9386dcb6c87cd3dd05d525fa8a3a579a290892e60ddbda47e"
1705
+ dependencies = [
1706
+ "anyhow",
1707
+ "bytes",
1708
+ "once_cell",
1709
+ "static_assertions",
1710
+ ]
1711
+
1712
+ [[package]]
1713
+ name = "uniffi_internal_macros"
1714
+ version = "0.31.0"
1715
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1716
+ checksum = "98f51ebca0d9a4b2aa6c644d5ede45c56f73906b96403c08a1985e75ccb64a01"
1717
+ dependencies = [
1718
+ "anyhow",
1719
+ "indexmap",
1720
+ "proc-macro2",
1721
+ "quote",
1722
+ "syn",
1723
+ ]
1724
+
1725
+ [[package]]
1726
+ name = "uniffi_macros"
1727
+ version = "0.31.0"
1728
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1729
+ checksum = "db9d12529f1223d014fd501e5f29ca0884d15d6ed5ddddd9f506e55350327dc3"
1730
+ dependencies = [
1731
+ "camino",
1732
+ "fs-err",
1733
+ "once_cell",
1734
+ "proc-macro2",
1735
+ "quote",
1736
+ "serde",
1737
+ "syn",
1738
+ "toml",
1739
+ "uniffi_meta",
1740
+ ]
1741
+
1742
+ [[package]]
1743
+ name = "uniffi_meta"
1744
+ version = "0.31.0"
1745
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1746
+ checksum = "9df6d413db2827c68588f8149d30d49b71d540d46539e435b23a7f7dbd4d4f86"
1747
+ dependencies = [
1748
+ "anyhow",
1749
+ "siphasher",
1750
+ "uniffi_internal_macros",
1751
+ "uniffi_pipeline",
1752
+ ]
1753
+
1754
+ [[package]]
1755
+ name = "uniffi_pipeline"
1756
+ version = "0.31.0"
1757
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1758
+ checksum = "a806dddc8208f22efd7e95a5cdf88ed43d0f3271e8f63b47e757a8bbdb43b63a"
1759
+ dependencies = [
1760
+ "anyhow",
1761
+ "heck",
1762
+ "indexmap",
1763
+ "tempfile",
1764
+ "uniffi_internal_macros",
1765
+ ]
1766
+
1767
+ [[package]]
1768
+ name = "uniffi_udl"
1769
+ version = "0.31.0"
1770
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1771
+ checksum = "0d1a7339539bf6f6fa3e9b534dece13f778bda2d54b1a6d4e40b4d6090ac26e7"
1772
+ dependencies = [
1773
+ "anyhow",
1774
+ "textwrap",
1775
+ "uniffi_meta",
1776
+ "weedle2",
1777
+ ]
1778
+
1415
1779
  [[package]]
1416
1780
  name = "unindent"
1417
1781
  version = "0.2.4"
@@ -1588,6 +1952,15 @@ dependencies = [
1588
1952
  "wasm-bindgen",
1589
1953
  ]
1590
1954
 
1955
+ [[package]]
1956
+ name = "weedle2"
1957
+ version = "5.0.0"
1958
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1959
+ checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e"
1960
+ dependencies = [
1961
+ "nom",
1962
+ ]
1963
+
1591
1964
  [[package]]
1592
1965
  name = "winapi-util"
1593
1966
  version = "0.1.11"
@@ -1678,6 +2051,21 @@ version = "0.42.2"
1678
2051
  source = "registry+https://github.com/rust-lang/crates.io-index"
1679
2052
  checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
1680
2053
 
2054
+ [[package]]
2055
+ name = "winnow"
2056
+ version = "0.7.15"
2057
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2058
+ checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
2059
+ dependencies = [
2060
+ "memchr",
2061
+ ]
2062
+
2063
+ [[package]]
2064
+ name = "winnow"
2065
+ version = "1.0.0"
2066
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2067
+ checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8"
2068
+
1681
2069
  [[package]]
1682
2070
  name = "wit-bindgen"
1683
2071
  version = "0.51.0"
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/iscc-lib", "crates/iscc-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.3.0"
6
+ version = "0.4.0"
7
7
  edition = "2024"
8
8
  rust-version = "1.85"
9
9
  authors = ["Titusz Pan <tp@py7.de>"]
@@ -34,6 +34,7 @@ criterion = { version = "0.5", features = ["html_reports"] }
34
34
  tempfile = "3"
35
35
  jni = "0.21"
36
36
  magnus = { version = "0.7", features = ["rb-sys"] }
37
+ uniffi = "0.31"
37
38
 
38
39
  [profile.release]
39
40
  lto = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iscc-lib
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Classifier: Development Status :: 2 - Pre-Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -5,7 +5,7 @@ Pure Rust implementation of ISO 24138:2024 (ISCC) -- the hub of the hub-and-spok
5
5
  ## Crate Role
6
6
 
7
7
  - This is the **core crate** that all binding crates (`iscc-py`, `iscc-napi`, `iscc-wasm`,
8
- `iscc-ffi`, `iscc-jni`) depend on
8
+ `iscc-ffi`, `iscc-jni`, `iscc-rb`) depend on
9
9
  - Must remain **pure Rust** -- zero binding dependencies (no PyO3, napi, wasm-bindgen)
10
10
  - Publishable to crates.io as `iscc-lib`
11
11
  - All ISCC algorithm logic lives here; binding crates only translate the API
@@ -28,7 +28,7 @@ Pure Rust implementation of ISO 24138:2024 (ISCC) -- the hub of the hub-and-spok
28
28
 
29
29
  ## API Tier Rules
30
30
 
31
- **Tier 1 -- public API, bound in all languages (30 symbols at crate root):**
31
+ **Tier 1 -- public API, bound in all languages (32 symbols at crate root):**
32
32
 
33
33
  - 10 gen functions: `gen_meta_code_v0`, `gen_text_code_v0`, `gen_image_code_v0`,
34
34
  `gen_audio_code_v0`, `gen_video_code_v0`, `gen_mixed_code_v0`, `gen_data_code_v0`,
@@ -38,11 +38,16 @@ Pure Rust implementation of ISO 24138:2024 (ISCC) -- the hub of the hub-and-spok
38
38
  - 1 soft hash: `soft_hash_video_v0`
39
39
  - 2 encoding utilities: `encode_base64`, `json_to_data_url`
40
40
  - 3 codec operations: `iscc_decompose`, `encode_component`, `iscc_decode`
41
- - 4 algorithm constants: `META_TRIM_NAME`, `META_TRIM_DESCRIPTION`, `IO_READ_SIZE`,
42
- `TEXT_NGRAM_SIZE`
41
+ - 5 algorithm constants: `META_TRIM_NAME`, `META_TRIM_DESCRIPTION`, `META_TRIM_META`,
42
+ `IO_READ_SIZE`, `TEXT_NGRAM_SIZE`
43
43
  - 2 streaming types: `DataHasher`, `InstanceHasher`
44
44
  - 1 diagnostic: `conformance_selftest`
45
45
 
46
+ Note: some Tier 1 symbols are feature-gated. `text_clean`, `text_collapse`, and `gen_text_code_v0`
47
+ require the `text-processing` feature. `gen_meta_code_v0`, `json_to_data_url`, `META_TRIM_NAME`,
48
+ `META_TRIM_DESCRIPTION`, and `META_TRIM_META` require the `meta-code` feature (which implies
49
+ `text-processing`). The `default` feature set includes `meta-code`.
50
+
46
51
  **Tier 2 -- `pub mod codec`, Rust-only, not exposed through bindings:**
47
52
 
48
53
  - `MainType`, `SubType`, `Version` enums
@@ -52,8 +57,9 @@ Pure Rust implementation of ISO 24138:2024 (ISCC) -- the hub of the hub-and-spok
52
57
  **Internal -- `pub(crate)` or private, free to change:**
53
58
 
54
59
  - `dct::alg_dct`, `wtahash::alg_wtahash`
55
- - Helper functions in `lib.rs` (`interleave_digests`, `soft_hash_meta_v0`, `soft_hash_text_v0`,
56
- `soft_hash_audio_v0`, `soft_hash_codes_v0`, etc.)
60
+ - Helper functions in `lib.rs` (`interleave_digests`, `meta_name_simhash`, `soft_hash_meta_v0`,
61
+ `soft_hash_meta_v0_with_bytes`, `soft_hash_text_v0`, `soft_hash_image_v0`, `soft_hash_audio_v0`,
62
+ `soft_hash_codes_v0`, etc.)
57
63
  - `utils::multi_hash_blake3`
58
64
 
59
65
  **Rules:**
@@ -86,13 +92,15 @@ new() -> update(&[u8]) -> ... -> update(&[u8]) -> finalize(bits) -> IsccResult<*
86
92
  - `*CodeResult` structs in `types.rs` -- each `gen_*_v0` returns a dedicated struct
87
93
  - All carry an `iscc: String` field (the ISCC code with `"ISCC:"` prefix)
88
94
  - Some carry additional fields: `name`, `description`, `meta`, `metahash`, `characters`,
89
- `datahash`, `filesize`, `parts`
95
+ `datahash`, `filesize`, `parts`, `units`
90
96
  - `codec::MainType`, `codec::SubType`, `codec::Version` -- `#[repr(u8)]` enums with `TryFrom<u8>`
91
97
 
92
98
  ## Conformance Rules
93
99
 
94
100
  - Correctness baseline: vendored `tests/data.json` from `iscc-core`
95
- - All 10 `gen_*_v0` functions must match `iscc-core` output for every test vector
101
+ - 9 of 10 `gen_*_v0` functions must match `iscc-core` output for every test vector
102
+ (`gen_sum_code_v0` has no conformance vectors — it composes Data-Code + Instance-Code
103
+ internally)
96
104
  - `conformance_selftest()` runs all vectors at runtime (non-panicking, returns bool)
97
105
  - Each `gen_*_v0` also has `#[test]` functions that run the same vectors and panic on mismatch
98
106
  - Streaming types (`DataHasher`/`InstanceHasher`) are tested against one-shot functions at multiple
@@ -116,13 +124,14 @@ cargo bench -p iscc-lib # Criterion benchmarks
116
124
  - `xxhash-rust` -- xxh32 feature hashing (Data-Code, Text-Code)
117
125
  - `data-encoding` -- base32/base64 encoding
118
126
  - `hex` -- hex encode/decode for conformance vector parsing
119
- - `unicode-normalization` -- NFKC/NFD normalization
120
- - `unicode-general-category` -- Unicode category classification for text filtering
127
+ - `unicode-normalization` -- NFKC/NFD normalization (optional, `text-processing` feature)
128
+ - `unicode-general-category` -- Unicode category classification for text filtering (optional,
129
+ `text-processing` feature)
121
130
  - `thiserror` -- error derive macro
122
131
  - `serde_json` -- JSON parsing for meta processing and conformance vectors
123
132
  - `serde_json_canonicalizer` -- RFC 8785 (JCS) compliant JSON serialization for metadata
124
- canonicalization
125
- - `serde` + `criterion` -- dev-dependencies only
133
+ canonicalization (optional, `meta-code` feature)
134
+ - `serde`, `criterion`, `tempfile` -- dev-dependencies only
126
135
 
127
136
  ## Common Pitfalls
128
137
 
@@ -25,7 +25,7 @@ crates/iscc-py/
25
25
  Cargo.toml # cdylib crate, lib name = "_lowlevel"
26
26
  pyproject.toml # maturin build backend, module-name = "iscc_lib._lowlevel"
27
27
  src/
28
- lib.rs # All PyO3 bindings: 21 #[pyfunction]s + 2 #[pyclass]es + #[pymodule]
28
+ lib.rs # All PyO3 bindings: 27 #[pyfunction]s + 2 #[pyclass]es + #[pymodule]
29
29
  python/iscc_lib/
30
30
  __init__.py # Public API: wrapper functions, IsccResult classes, re-exports
31
31
  _lowlevel.pyi # Type stubs for the native Rust extension module
@@ -45,31 +45,39 @@ crates/iscc-py/
45
45
 
46
46
  - Imports `_lowlevel` functions as private names (e.g., `_gen_meta_code_v0`)
47
47
  - Wraps each in a public function that returns a typed `IsccResult` subclass
48
- - `gen_data_code_v0` and `gen_instance_code_v0` accept `bytes | BinaryIO` (call `.read()` for
49
- streams)
48
+ - `gen_meta_code_v0` accepts `meta: str | dict | None` (dicts are serialized via `json_to_data_url`)
49
+ - `gen_image_code_v0` accepts `bytes | bytearray | memoryview | Sequence[int]` (coerced to `bytes`)
50
+ - `gen_data_code_v0` and `gen_instance_code_v0` accept `bytes | bytearray | memoryview | BinaryIO`
51
+ (streams read in 64 KiB chunks via the streaming hashers)
52
+ - `gen_sum_code_v0` accepts `str | os.PathLike` (converted via `os.fspath`)
53
+ - `iscc_decode` is wrapped to return `MT`, `ST`, `VS` IntEnum values instead of raw ints
54
+ - `MT`, `ST`, `VS` are IntEnum classes for MainType, SubType, and Version identifiers
55
+ - `core_opts` is a `SimpleNamespace` exposing algorithm configuration constants
50
56
  - `DataHasher` and `InstanceHasher` are Python wrapper classes that delegate to `_lowlevel`
51
- counterparts
57
+ counterparts; constructors accept optional initial data (`bytes | BinaryIO`), and `update()`
58
+ accepts `bytes | bytearray | memoryview | BinaryIO`
52
59
  - Algorithm functions and utilities re-exported directly (no wrapping needed)
53
60
 
54
61
  ## Type Mapping: Rust to Python
55
62
 
56
- | Rust type (core API) | PyO3 binding | Python public API |
57
- | --------------------------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------- |
58
- | `MetaCodeResult` struct | `PyDict` with `iscc`, `name`, `metahash`, optional `description`/`meta` | `MetaCodeResult(IsccResult)` |
59
- | `TextCodeResult` struct | `PyDict` with `iscc`, `characters` | `TextCodeResult(IsccResult)` |
60
- | `DataCodeResult` struct | `PyDict` with `iscc` | `DataCodeResult(IsccResult)` |
61
- | `InstanceCodeResult` struct | `PyDict` with `iscc`, `datahash`, `filesize` | `InstanceCodeResult(IsccResult)` |
62
- | `IsccCodeResult` struct | `PyDict` with `iscc` | `IsccCodeResult(IsccResult)` |
63
- | `MixedCodeResult` struct | `PyDict` with `iscc`, `parts` | `MixedCodeResult(IsccResult)` |
64
- | `ImageCodeResult` / `AudioCodeResult` / `VideoCodeResult` | `PyDict` with `iscc` | Corresponding `IsccResult` subclass |
65
- | `iscc_lib::Error` | `PyValueError` | `ValueError` |
66
- | `Vec<u8>` (from `soft_hash_video_v0`) | `PyBytes` | `bytes` |
67
- | `DataHasher` / `InstanceHasher` | `#[pyclass]` with `Option<inner>` | Python wrapper class accepting `bytes \| BinaryIO` |
63
+ | Rust type (core API) | PyO3 binding | Python public API |
64
+ | --------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------- |
65
+ | `MetaCodeResult` struct | `PyDict` with `iscc`, `name`, `metahash`, optional `description`/`meta` | `MetaCodeResult(IsccResult)` |
66
+ | `TextCodeResult` struct | `PyDict` with `iscc`, `characters` | `TextCodeResult(IsccResult)` |
67
+ | `DataCodeResult` struct | `PyDict` with `iscc` | `DataCodeResult(IsccResult)` |
68
+ | `InstanceCodeResult` struct | `PyDict` with `iscc`, `datahash`, `filesize` | `InstanceCodeResult(IsccResult)` |
69
+ | `IsccCodeResult` struct | `PyDict` with `iscc` | `IsccCodeResult(IsccResult)` |
70
+ | `MixedCodeResult` struct | `PyDict` with `iscc`, `parts` | `MixedCodeResult(IsccResult)` |
71
+ | `ImageCodeResult` / `AudioCodeResult` / `VideoCodeResult` | `PyDict` with `iscc` | Corresponding `IsccResult` subclass |
72
+ | `SumCodeResult` struct | `PyDict` with `iscc`, `datahash`, `filesize`, optional `units` | `SumCodeResult(IsccResult)` |
73
+ | `iscc_lib::Error` | `PyValueError` | `ValueError` |
74
+ | `Vec<u8>` (from `soft_hash_video_v0` / `*_flat` variants) | `PyBytes` | `bytes` |
75
+ | `DataHasher` / `InstanceHasher` | `#[pyclass]` with `Option<inner>` | Python wrapper class accepting `bytes \| bytearray \| BinaryIO` |
68
76
 
69
77
  ### IsccResult hierarchy
70
78
 
71
79
  - `IsccResult(dict)` base class with `__getattr__` for attribute-style access
72
- - 9 typed subclasses with class-level annotations for IDE completion
80
+ - 10 typed subclasses with class-level annotations for IDE completion
73
81
  - `isinstance(result, dict)` is `True` -- full dict protocol compatibility
74
82
  - `json.dumps(result)` works without custom serializer
75
83
 
@@ -82,7 +90,8 @@ crates/iscc-py/
82
90
  - Optional keys (`description`, `meta`) must be absent (not `None`) when not provided
83
91
  - Bindings must NOT define semantics -- they translate the core API only
84
92
  - Conformance vectors from `crates/iscc-lib/tests/data.json` are the correctness baseline
85
- - All 10 `gen_*_v0` functions must match iscc-core output for every vector
93
+ - All 9 conformance `gen_*_v0` functions must match iscc-core output for every vector
94
+ - `gen_sum_code_v0` is iscc-lib-only (not in iscc-core) and has no conformance vectors
86
95
 
87
96
  ## Build Commands
88
97
 
@@ -106,11 +115,14 @@ mise run format
106
115
  ## Test Patterns
107
116
 
108
117
  - Tests live in `/workspace/iscc-lib/tests/` (project root), not inside the crate
109
- - `test_conformance.py` -- parametrized tests for all 10 `gen_*_v0` against `data.json` vectors
118
+ - `test_conformance.py` -- parametrized tests for all 9 conformance `gen_*_v0` against `data.json`
119
+ vectors
110
120
  - `test_smoke.py` -- basic functionality, IsccResult hierarchy, attribute access, BinaryIO streaming
111
121
  - `test_text_utils.py` -- text utility functions
112
122
  - `test_algo.py` -- algorithm primitives
113
123
  - `test_streaming.py` -- DataHasher and InstanceHasher streaming
124
+ - `test_new_symbols.py` -- constants, encode/decode roundtrips, dict meta, PIL pixel data, IntEnums,
125
+ core_opts
114
126
  - All tests use `from iscc_lib import ...` (the public Python API, not `_lowlevel`)
115
127
  - Tests verify both `result["key"]` dict access and `result.key` attribute access
116
128
  - Stream tests verify `BytesIO` input produces identical output to `bytes` input
@@ -125,9 +137,9 @@ mise run format
125
137
 
126
138
  - OIDC trusted publishing to PyPI (no long-lived API keys)
127
139
  - One wheel per platform via `abi3-py310`
128
- - Build matrix: Linux (i686, x86_64, armv7l, aarch64), macOS (universal2), Windows (x64, x86)
140
+ - Build matrix: Linux (x86_64), macOS (universal2), Windows (x64)
129
141
  - sdist also published
130
- - Tag-triggered: `git tag v*` triggers `.github/workflows/build-wheels.yml`
142
+ - Tag-triggered: `git tag v*.*.*` triggers `.github/workflows/release.yml`
131
143
  - Release profile: `lto = true`, `codegen-units = 1`, `strip = true`, `panic = "abort"`
132
144
 
133
145
  ## Common Pitfalls
@@ -144,4 +156,4 @@ mise run format
144
156
  - Do NOT use `serde_json` for dict construction -- use `PyDict::new()` and `set_item()`
145
157
  - When adding a Tier 1 function: add to `lib.rs` (#[pyfunction] + register in module),
146
158
  `_lowlevel.pyi` (stub), `__init__.py` (wrapper + re-export + `__all__`), and tests
147
- - The `sliding_window` width < 2 check is in the PyO3 layer (not core) to raise `ValueError`
159
+ - The `sliding_window` width < 2 check is in the Rust core; the PyO3 layer passes through the error
File without changes
File without changes