dryoc 2.0.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 (225) hide show
  1. dryoc-2.0.0/.config/nextest.toml +47 -0
  2. dryoc-2.0.0/.github/FUNDING.yml +3 -0
  3. dryoc-2.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +44 -0
  4. dryoc-2.0.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. dryoc-2.0.0/.github/actions/install-nextest/action.yml +19 -0
  6. dryoc-2.0.0/.github/dependabot.yml +10 -0
  7. dryoc-2.0.0/.github/scripts/test-wheel.sh +24 -0
  8. dryoc-2.0.0/.github/workflows/build-and-test.yml +629 -0
  9. dryoc-2.0.0/.github/workflows/coverage.yml +48 -0
  10. dryoc-2.0.0/.github/workflows/publish.yml +375 -0
  11. dryoc-2.0.0/.gitignore +8 -0
  12. dryoc-2.0.0/.rustfmt.toml +12 -0
  13. dryoc-2.0.0/AGENTS.md +376 -0
  14. dryoc-2.0.0/BENCHMARKS.md +446 -0
  15. dryoc-2.0.0/COMPATIBILITY.md +136 -0
  16. dryoc-2.0.0/Cargo.toml +98 -0
  17. dryoc-2.0.0/LICENSE +7 -0
  18. dryoc-2.0.0/PKG-INFO +296 -0
  19. dryoc-2.0.0/README.md +127 -0
  20. dryoc-2.0.0/UPGRADING.md +296 -0
  21. dryoc-2.0.0/benchmarks/charts.gp +91 -0
  22. dryoc-2.0.0/benchmarks/results-aarch64.dat +19 -0
  23. dryoc-2.0.0/benchmarks/results-x86_64.dat +20 -0
  24. dryoc-2.0.0/benchmarks/speedup.svg +454 -0
  25. dryoc-2.0.0/benchmarks/throughput-aarch64.svg +321 -0
  26. dryoc-2.0.0/benchmarks/throughput-x86_64.svg +321 -0
  27. dryoc-2.0.0/build.rs +35 -0
  28. dryoc-2.0.0/dryoc.png +0 -0
  29. dryoc-2.0.0/netlify.toml +3 -0
  30. dryoc-2.0.0/pyproject.toml +71 -0
  31. dryoc-2.0.0/python/Cargo.lock +552 -0
  32. dryoc-2.0.0/python/Cargo.toml +44 -0
  33. dryoc-2.0.0/python/README.md +263 -0
  34. dryoc-2.0.0/python/dryoc/__init__.py +63 -0
  35. dryoc-2.0.0/python/dryoc/_dryoc.pyi +153 -0
  36. dryoc-2.0.0/python/dryoc/_types.py +37 -0
  37. dryoc-2.0.0/python/dryoc/aead.py +18 -0
  38. dryoc-2.0.0/python/dryoc/aead.pyi +112 -0
  39. dryoc-2.0.0/python/dryoc/box.py +23 -0
  40. dryoc-2.0.0/python/dryoc/box.pyi +143 -0
  41. dryoc-2.0.0/python/dryoc/exceptions.py +24 -0
  42. dryoc-2.0.0/python/dryoc/hash.py +68 -0
  43. dryoc-2.0.0/python/dryoc/hash.pyi +219 -0
  44. dryoc-2.0.0/python/dryoc/kdf.py +20 -0
  45. dryoc-2.0.0/python/dryoc/kdf.pyi +91 -0
  46. dryoc-2.0.0/python/dryoc/kem/__init__.py +20 -0
  47. dryoc-2.0.0/python/dryoc/kem/mlkem768.py +12 -0
  48. dryoc-2.0.0/python/dryoc/kem/mlkem768.pyi +94 -0
  49. dryoc-2.0.0/python/dryoc/kem/xwing.py +10 -0
  50. dryoc-2.0.0/python/dryoc/kem/xwing.pyi +94 -0
  51. dryoc-2.0.0/python/dryoc/kx.py +19 -0
  52. dryoc-2.0.0/python/dryoc/kx.pyi +48 -0
  53. dryoc-2.0.0/python/dryoc/mac.py +37 -0
  54. dryoc-2.0.0/python/dryoc/mac.pyi +77 -0
  55. dryoc-2.0.0/python/dryoc/pwhash.py +148 -0
  56. dryoc-2.0.0/python/dryoc/py.typed +0 -0
  57. dryoc-2.0.0/python/dryoc/sealedbox.py +20 -0
  58. dryoc-2.0.0/python/dryoc/sealedbox.pyi +39 -0
  59. dryoc-2.0.0/python/dryoc/secretbox.py +16 -0
  60. dryoc-2.0.0/python/dryoc/secretbox.pyi +43 -0
  61. dryoc-2.0.0/python/dryoc/secretstream.py +23 -0
  62. dryoc-2.0.0/python/dryoc/secretstream.pyi +123 -0
  63. dryoc-2.0.0/python/dryoc/sign.py +16 -0
  64. dryoc-2.0.0/python/dryoc/sign.pyi +97 -0
  65. dryoc-2.0.0/python/src/aead.rs +196 -0
  66. dryoc-2.0.0/python/src/hash.rs +499 -0
  67. dryoc-2.0.0/python/src/kdf.rs +212 -0
  68. dryoc-2.0.0/python/src/kem.rs +367 -0
  69. dryoc-2.0.0/python/src/kx.rs +97 -0
  70. dryoc-2.0.0/python/src/lib.rs +148 -0
  71. dryoc-2.0.0/python/src/mac.rs +186 -0
  72. dryoc-2.0.0/python/src/public_box.rs +338 -0
  73. dryoc-2.0.0/python/src/pwhash.rs +143 -0
  74. dryoc-2.0.0/python/src/secretbox.rs +72 -0
  75. dryoc-2.0.0/python/src/secretstream.rs +318 -0
  76. dryoc-2.0.0/python/src/sign.rs +251 -0
  77. dryoc-2.0.0/python/src/util.rs +444 -0
  78. dryoc-2.0.0/python/tests/conftest.py +48 -0
  79. dryoc-2.0.0/python/tests/test_box_kx.py +110 -0
  80. dryoc-2.0.0/python/tests/test_hash.py +192 -0
  81. dryoc-2.0.0/python/tests/test_kem.py +101 -0
  82. dryoc-2.0.0/python/tests/test_libsodium_interop.py +236 -0
  83. dryoc-2.0.0/python/tests/test_mac_kdf.py +162 -0
  84. dryoc-2.0.0/python/tests/test_objects.py +206 -0
  85. dryoc-2.0.0/python/tests/test_pwhash.py +72 -0
  86. dryoc-2.0.0/python/tests/test_secretbox_aead.py +150 -0
  87. dryoc-2.0.0/python/tests/test_secretstream.py +187 -0
  88. dryoc-2.0.0/python/tests/test_sign.py +113 -0
  89. dryoc-2.0.0/python/tests/test_stubs.py +79 -0
  90. dryoc-2.0.0/ruff.toml +7 -0
  91. dryoc-2.0.0/src/aarch64.rs +76 -0
  92. dryoc-2.0.0/src/argon2/argon2_neon.rs +487 -0
  93. dryoc-2.0.0/src/argon2/argon2_simd.rs +95 -0
  94. dryoc-2.0.0/src/argon2/argon2_soft.rs +155 -0
  95. dryoc-2.0.0/src/argon2/argon2_x86_64.rs +367 -0
  96. dryoc-2.0.0/src/argon2/mod.rs +1384 -0
  97. dryoc-2.0.0/src/auth.rs +330 -0
  98. dryoc-2.0.0/src/blake2b/blake2b_aarch64.rs +240 -0
  99. dryoc-2.0.0/src/blake2b/blake2b_simd.rs +801 -0
  100. dryoc-2.0.0/src/blake2b/blake2b_soft.rs +883 -0
  101. dryoc-2.0.0/src/blake2b/blake2b_x86_64.rs +462 -0
  102. dryoc-2.0.0/src/blake2b/mod.rs +547 -0
  103. dryoc-2.0.0/src/blake2b/test-vectors/blake2b-test-vectors.json +3074 -0
  104. dryoc-2.0.0/src/bytes_serde.rs +438 -0
  105. dryoc-2.0.0/src/chacha20/chacha20_aarch64.rs +143 -0
  106. dryoc-2.0.0/src/chacha20/chacha20_neon.rs +1100 -0
  107. dryoc-2.0.0/src/chacha20/chacha20_soft.rs +95 -0
  108. dryoc-2.0.0/src/chacha20/chacha20_wasm32.rs +219 -0
  109. dryoc-2.0.0/src/chacha20/chacha20_x86_64.rs +615 -0
  110. dryoc-2.0.0/src/chacha20/mod.rs +1480 -0
  111. dryoc-2.0.0/src/classic/crypto_aead_chacha20poly1305_ietf.rs +496 -0
  112. dryoc-2.0.0/src/classic/crypto_aead_chacha20poly1305_impl.rs +767 -0
  113. dryoc-2.0.0/src/classic/crypto_aead_xchacha20poly1305_ietf.rs +484 -0
  114. dryoc-2.0.0/src/classic/crypto_auth.rs +177 -0
  115. dryoc-2.0.0/src/classic/crypto_auth_hmac_impl.rs +522 -0
  116. dryoc-2.0.0/src/classic/crypto_auth_hmacsha256.rs +125 -0
  117. dryoc-2.0.0/src/classic/crypto_auth_hmacsha512.rs +128 -0
  118. dryoc-2.0.0/src/classic/crypto_auth_hmacsha512256.rs +136 -0
  119. dryoc-2.0.0/src/classic/crypto_box.rs +1327 -0
  120. dryoc-2.0.0/src/classic/crypto_box_impl.rs +90 -0
  121. dryoc-2.0.0/src/classic/crypto_core.rs +824 -0
  122. dryoc-2.0.0/src/classic/crypto_generichash.rs +272 -0
  123. dryoc-2.0.0/src/classic/crypto_hash.rs +518 -0
  124. dryoc-2.0.0/src/classic/crypto_kdf.rs +652 -0
  125. dryoc-2.0.0/src/classic/crypto_kem.rs +154 -0
  126. dryoc-2.0.0/src/classic/crypto_kem_mlkem768.rs +415 -0
  127. dryoc-2.0.0/src/classic/crypto_kem_xwing.rs +675 -0
  128. dryoc-2.0.0/src/classic/crypto_kx.rs +291 -0
  129. dryoc-2.0.0/src/classic/crypto_onetimeauth.rs +315 -0
  130. dryoc-2.0.0/src/classic/crypto_pwhash.rs +1439 -0
  131. dryoc-2.0.0/src/classic/crypto_secretbox.rs +732 -0
  132. dryoc-2.0.0/src/classic/crypto_secretbox_impl.rs +236 -0
  133. dryoc-2.0.0/src/classic/crypto_secretstream_xchacha20poly1305.rs +1649 -0
  134. dryoc-2.0.0/src/classic/crypto_shorthash.rs +95 -0
  135. dryoc-2.0.0/src/classic/crypto_sign.rs +524 -0
  136. dryoc-2.0.0/src/classic/crypto_sign_ed25519.rs +1113 -0
  137. dryoc-2.0.0/src/classic/crypto_xof.rs +385 -0
  138. dryoc-2.0.0/src/classic/generichash_blake2b.rs +153 -0
  139. dryoc-2.0.0/src/constants.rs +564 -0
  140. dryoc-2.0.0/src/dryocaead.rs +1679 -0
  141. dryoc-2.0.0/src/dryocbox.rs +1465 -0
  142. dryoc-2.0.0/src/dryocsealedbox.rs +610 -0
  143. dryoc-2.0.0/src/dryocsecretbox.rs +806 -0
  144. dryoc-2.0.0/src/dryocstream/tag.rs +117 -0
  145. dryoc-2.0.0/src/dryocstream.rs +923 -0
  146. dryoc-2.0.0/src/edwards25519/edwards25519_neon.rs +158 -0
  147. dryoc-2.0.0/src/edwards25519/edwards25519_x86_64.rs +84 -0
  148. dryoc-2.0.0/src/edwards25519/mod.rs +1617 -0
  149. dryoc-2.0.0/src/edwards25519/tables.rs +1187 -0
  150. dryoc-2.0.0/src/error.rs +619 -0
  151. dryoc-2.0.0/src/fe25519/fe25519_aarch64.rs +405 -0
  152. dryoc-2.0.0/src/fe25519/fe25519_soft.rs +169 -0
  153. dryoc-2.0.0/src/fe25519/fe64_aarch64.rs +560 -0
  154. dryoc-2.0.0/src/fe25519/mod.rs +821 -0
  155. dryoc-2.0.0/src/fe25519/safegcd.rs +397 -0
  156. dryoc-2.0.0/src/generichash.rs +577 -0
  157. dryoc-2.0.0/src/hkdf.rs +745 -0
  158. dryoc-2.0.0/src/hmac.rs +655 -0
  159. dryoc-2.0.0/src/kdf.rs +456 -0
  160. dryoc-2.0.0/src/keccak/keccak3_aarch64.py +619 -0
  161. dryoc-2.0.0/src/keccak/keccak3_aarch64.rs +1765 -0
  162. dryoc-2.0.0/src/keccak/keccak_aarch64.rs +339 -0
  163. dryoc-2.0.0/src/keccak/keccak_soft.rs +316 -0
  164. dryoc-2.0.0/src/keccak/keccak_wasm32.rs +144 -0
  165. dryoc-2.0.0/src/keccak/keccak_x86_64.rs +234 -0
  166. dryoc-2.0.0/src/keccak/mod.rs +1116 -0
  167. dryoc-2.0.0/src/kem.rs +366 -0
  168. dryoc-2.0.0/src/keypair.rs +652 -0
  169. dryoc-2.0.0/src/kx.rs +459 -0
  170. dryoc-2.0.0/src/lib.rs +266 -0
  171. dryoc-2.0.0/src/mlkem/mlkem_neon.rs +979 -0
  172. dryoc-2.0.0/src/mlkem/mlkem_soft.rs +249 -0
  173. dryoc-2.0.0/src/mlkem/mlkem_wasm32.rs +462 -0
  174. dryoc-2.0.0/src/mlkem/mlkem_x86_64.rs +535 -0
  175. dryoc-2.0.0/src/mlkem/mod.rs +907 -0
  176. dryoc-2.0.0/src/mlkem/test-vectors/hpke_xwing_hkdfsha256_chacha20poly1305.txt +18 -0
  177. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_decap.txt +65 -0
  178. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_ek_check.txt +54 -0
  179. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_encap.txt +34 -0
  180. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_keygen.txt +34 -0
  181. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_modulus.txt +2352 -0
  182. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_strcmp.txt +9 -0
  183. dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_unlucky.txt +18 -0
  184. dryoc-2.0.0/src/mlkem/test-vectors/xwing_draft.txt +27 -0
  185. dryoc-2.0.0/src/mlkem/test-vectors/xwing_libsodium_edge.txt +40 -0
  186. dryoc-2.0.0/src/mlkem/tests.rs +438 -0
  187. dryoc-2.0.0/src/native_test_util.rs +1370 -0
  188. dryoc-2.0.0/src/neon.rs +146 -0
  189. dryoc-2.0.0/src/onetimeauth.rs +352 -0
  190. dryoc-2.0.0/src/poly1305/mod.rs +893 -0
  191. dryoc-2.0.0/src/poly1305/poly1305_aarch64.rs +160 -0
  192. dryoc-2.0.0/src/poly1305/poly1305_simd.rs +638 -0
  193. dryoc-2.0.0/src/poly1305/poly1305_soft.rs +1085 -0
  194. dryoc-2.0.0/src/poly1305/poly1305_wasm32.rs +354 -0
  195. dryoc-2.0.0/src/poly1305/poly1305_x86_64.rs +1237 -0
  196. dryoc-2.0.0/src/precalc.rs +348 -0
  197. dryoc-2.0.0/src/protected.rs +2845 -0
  198. dryoc-2.0.0/src/pwhash.rs +1226 -0
  199. dryoc-2.0.0/src/rng.rs +76 -0
  200. dryoc-2.0.0/src/salsa20/mod.rs +1247 -0
  201. dryoc-2.0.0/src/salsa20/salsa20_neon.rs +781 -0
  202. dryoc-2.0.0/src/salsa20/salsa20_simd.rs +177 -0
  203. dryoc-2.0.0/src/salsa20/salsa20_soft.rs +190 -0
  204. dryoc-2.0.0/src/salsa20/salsa20_wasm32.rs +157 -0
  205. dryoc-2.0.0/src/salsa20/salsa20_x86_64.rs +590 -0
  206. dryoc-2.0.0/src/scalarmult_curve25519.rs +572 -0
  207. dryoc-2.0.0/src/sha256/mod.rs +180 -0
  208. dryoc-2.0.0/src/sha256/sha256_aarch64.rs +191 -0
  209. dryoc-2.0.0/src/sha2_impl.rs +330 -0
  210. dryoc-2.0.0/src/sha3.rs +394 -0
  211. dryoc-2.0.0/src/sha512/mod.rs +289 -0
  212. dryoc-2.0.0/src/sha512/sha512_aarch64.rs +1375 -0
  213. dryoc-2.0.0/src/sign.rs +1150 -0
  214. dryoc-2.0.0/src/siphash24.rs +169 -0
  215. dryoc-2.0.0/src/stream.rs +282 -0
  216. dryoc-2.0.0/src/types.rs +670 -0
  217. dryoc-2.0.0/src/unsafe_code.rs +55 -0
  218. dryoc-2.0.0/src/utils.rs +539 -0
  219. dryoc-2.0.0/src/wasm32.rs +112 -0
  220. dryoc-2.0.0/src/wincode_schema.rs +79 -0
  221. dryoc-2.0.0/src/x86_64.rs +830 -0
  222. dryoc-2.0.0/src/xof.rs +650 -0
  223. dryoc-2.0.0/tests/integration_tests.rs +2122 -0
  224. dryoc-2.0.0/tests/support/vectors.rs +39 -0
  225. dryoc-2.0.0/tests/wasm_tests.rs +854 -0
@@ -0,0 +1,47 @@
1
+ [profile.default-miri]
2
+ # Miri runs each test in a separate interpreter. Report all failures, and
3
+ # terminate stuck tests rather than consuming the entire CI job timeout.
4
+ fail-fast = false
5
+ slow-timeout = { period = "60s", terminate-after = 15 }
6
+
7
+ # PR coverage targets unsafe views, wiping, schemas and representative public
8
+ # operations. The full suite remains the default for local Miri runs.
9
+ [profile.miri-smoke]
10
+ inherits = "default-miri"
11
+ slow-timeout = { period = "60s", terminate-after = 10 }
12
+ default-filter = '''
13
+ test(/^types::tests::/)
14
+ | test(/^bytes_serde::tests::/)
15
+ | test(/^utils::tests::test_zeroize/)
16
+ | test(=generichash::tests::test_vectors)
17
+ | test(=argon2::tests::test_vector_argon2i)
18
+ | test(=argon2::tests::test_vector_argon2id)
19
+ | test(=scalarmult_curve25519::tests::test_rfc7748_vectors)
20
+ | test(=sign::tests::rfc8032_detached_signatures_and_signed_message_wire_format)
21
+ | test(=poly1305::tests::rfc8439_a3_final_reduction_vectors)
22
+ | test(=classic::crypto_aead_chacha20poly1305_ietf::tests::test_failures_leave_outputs_untouched)
23
+ | test(=classic::crypto_aead_xchacha20poly1305_ietf::tests::test_failures_leave_outputs_untouched)
24
+ | test(=classic::crypto_secretstream_xchacha20poly1305::tests::pull_authenticates_before_mutating_outputs_or_state)
25
+ | test(=dryocaead::tests::kat::chacha_wincode_round_trips_decrypt_with_classic)
26
+ | test(=test_dryocbox_wincode_wire_format)
27
+ | test(=test_dryocsecretbox_wincode_wire_format)
28
+ | test(=test_dryocaead_wincode_wire_format)
29
+ | test(=test_classic_hmac_and_hkdf_public_api)
30
+ | test(=test_sha3_public_api)
31
+ | test(=test_streams)
32
+ '''
33
+
34
+ # Run with RUSTFLAGS="-Ctarget-feature=+avx2,+bmi2" so these kernels execute
35
+ # instead of returning early on Miri's baseline virtual CPU.
36
+ [profile.miri-kernels]
37
+ inherits = "miri-smoke"
38
+ default-filter = '''
39
+ test(=poly1305::poly1305_soft::tests::avx2_blocks_match_scalar)
40
+ | test(=blake2b::blake2b_soft::tests::test_x86_64_compress_matches_portable)
41
+ | test(=argon2::tests::test_fill_block_x86_64_matches_soft)
42
+ | test(=chacha20::tests::vector_path::test_kernel_chunk_matches_scalar_blocks)
43
+ | test(=salsa20::tests::vector_path::test_kernel_chunk_matches_scalar_blocks)
44
+ | test(=scalarmult_curve25519::tests::test_rfc7748_vectors)
45
+ | test(=mlkem::tests::test_backends_match_soft)
46
+ | test(=keccak::tests::test_x86_64_permute4_matches_scalar)
47
+ '''
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: brndnmtthws
@@ -0,0 +1,44 @@
1
+ name: 🐞 Bug Report
2
+ description: "File a bug report: crashes, unexpected behaviour, and other errors go here."
3
+ title: "[Bug]: "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ If you haven't done so already, please take a moment to search the [existing issues](https://github.com/brndnmtthws/dryoc/issues) to see if this has been previously reported. If not, carry on.
10
+
11
+ Thanks for taking the time to fill out this bug report!
12
+ - type: textarea
13
+ id: what-happened
14
+ attributes:
15
+ label: What happened?
16
+ description: >
17
+ Describe the problem, what you expected to happen, and any other
18
+ relevant info. You can sample code below.
19
+ placeholder: Here's what happened
20
+ validations:
21
+ required: true
22
+ - type: input
23
+ id: version
24
+ attributes:
25
+ label: Version
26
+ description: What version of dryoc are you using?
27
+ validations:
28
+ required: true
29
+ - type: dropdown
30
+ id: os
31
+ validations:
32
+ required: true
33
+ attributes:
34
+ label: Which OS are you seeing the problem on?
35
+ options:
36
+ - Linux
37
+ - macOS
38
+ - Windows
39
+ - type: textarea
40
+ id: code
41
+ attributes:
42
+ label: Test code
43
+ description: If possible, please provide a minimal code sample that produces the problem.
44
+ render: Rust
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: 🙏 General questions & help
4
+ url: https://github.com/brndnmtthws/dryoc/discussions/categories/q-a
5
+ about: Please ask and answer general questions using GitHub Discussions
6
+ - name: 💡 New ideas and feature requests
7
+ url: https://github.com/brndnmtthws/dryoc/discussions/categories/ideas
8
+ about: Request and discuss enhancements using GitHub Discussions
@@ -0,0 +1,19 @@
1
+ name: Install cargo-nextest
2
+
3
+ description: Install cargo-nextest with cargo-binstall
4
+
5
+ inputs:
6
+ packages:
7
+ description: cargo-binstall package arguments
8
+ required: false
9
+ default: --locked cargo-nextest
10
+
11
+ runs:
12
+ using: composite
13
+ steps:
14
+ - name: Install cargo-nextest
15
+ uses: brndnmtthws/rust-action-cargo-binstall@v1
16
+ with:
17
+ packages: ${{ inputs.packages }}
18
+ env:
19
+ GITHUB_TOKEN: ${{ github.token }}
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: "cargo"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+ # Test a prebuilt wheel against the Python test suite. Run from python/.
3
+ #
4
+ # Usage: test-wheel.sh PYTHON WHEEL_GLOB
5
+ #
6
+ # Recreates the project environment for PYTHON with only the locked test
7
+ # group, installs the wheel into it (`--no-sync` keeps uv from building the
8
+ # project) and checks that the tests import the installed package, not the
9
+ # sources in the checkout. On a free-threaded interpreter, importing dryoc
10
+ # must leave the GIL disabled.
11
+ set -eu
12
+
13
+ python="$1"
14
+ wheel_glob="$2"
15
+
16
+ uv sync --locked --only-group test --python "$python"
17
+ # Unquoted on purpose: the glob expands to the one matching wheel. A glob
18
+ # without a match stays literal and uv reports the missing file.
19
+ # shellcheck disable=SC2086
20
+ uv pip install $wheel_glob
21
+ uv run --no-sync python -c "import dryoc; assert 'site-packages' in dryoc.__file__, dryoc.__file__"
22
+ uv run --no-sync python -c "import sys, sysconfig, dryoc; assert not (sysconfig.get_config_var('Py_GIL_DISABLED') and sys._is_gil_enabled())"
23
+ uv run --no-sync python -c "import nacl"
24
+ uv run --no-sync pytest -p no:cacheprovider tests