usearch 2.9.1 → 2.10.0

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 (169) hide show
  1. package/README.md +50 -52
  2. package/javascript/{types → dist/cjs}/usearch.d.ts +90 -115
  3. package/javascript/dist/cjs/usearch.js +531 -0
  4. package/javascript/dist/esm/usearch.d.ts +212 -0
  5. package/javascript/{usearch.js → dist/esm/usearch.js} +202 -153
  6. package/package.json +25 -23
  7. package/prebuilds/darwin-arm64+x64/usearch.node +0 -0
  8. package/prebuilds/linux-arm64/usearch.node +0 -0
  9. package/prebuilds/linux-x64/usearch.node +0 -0
  10. package/prebuilds/win32-ia32/usearch.node +0 -0
  11. package/prebuilds/win32-x64/usearch.node +0 -0
  12. package/.clang-format +0 -10
  13. package/.clang-tidy +0 -60
  14. package/.cmake-format.py +0 -19
  15. package/.dockerignore +0 -93
  16. package/.gitattributes +0 -9
  17. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -90
  18. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  19. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -64
  20. package/.github/workflows/Dockerfile.libs +0 -36
  21. package/.github/workflows/prerelease.yml +0 -331
  22. package/.github/workflows/release.yml +0 -722
  23. package/.github/workflows/update_version.sh +0 -15
  24. package/.gitmodules +0 -9
  25. package/.releaserc +0 -90
  26. package/CITATION.cff +0 -11
  27. package/CMakeLists.txt +0 -324
  28. package/CODE_OF_CONDUCT.md +0 -128
  29. package/CONTRIBUTING.md +0 -353
  30. package/Cargo.toml +0 -19
  31. package/Dockerfile +0 -16
  32. package/VERSION +0 -1
  33. package/assets/unum.png +0 -0
  34. package/assets/usearch-approaches-transparent.png +0 -0
  35. package/assets/usearch-approaches-white.png +0 -0
  36. package/assets/usearch-neighbor-types.png +0 -0
  37. package/binding.gyp +0 -87
  38. package/build.gradle +0 -204
  39. package/build.rs +0 -18
  40. package/c/CMakeLists.txt +0 -25
  41. package/c/README.md +0 -34
  42. package/c/lib.cpp +0 -358
  43. package/c/test.c +0 -374
  44. package/c/usearch.h +0 -311
  45. package/cmake/clipp.cmake +0 -7
  46. package/cmake/config.cmake.in +0 -15
  47. package/cmake/emscripten.cmake +0 -8
  48. package/cmake/jemalloc.cmake +0 -62
  49. package/cmake/pkg-config.pc.in +0 -4
  50. package/cmake/usearchConfigVersion.cmake.in +0 -20
  51. package/conanfile.py +0 -26
  52. package/cpp/CMakeLists.txt +0 -14
  53. package/cpp/README.md +0 -161
  54. package/cpp/bench.cpp +0 -618
  55. package/cpp/test.cpp +0 -323
  56. package/fp16/CMakeLists.txt +0 -176
  57. package/fp16/LICENSE +0 -11
  58. package/fp16/README.md +0 -20
  59. package/fp16/bench/alt-element.cc +0 -89
  60. package/fp16/bench/from-alt-array.cc +0 -175
  61. package/fp16/bench/from-ieee-array.cc +0 -399
  62. package/fp16/bench/ieee-element.cc +0 -272
  63. package/fp16/bench/to-alt-array.cc +0 -91
  64. package/fp16/bench/to-ieee-array.cc +0 -303
  65. package/fp16/cmake/DownloadGoogleBenchmark.cmake +0 -15
  66. package/fp16/cmake/DownloadGoogleTest.cmake +0 -15
  67. package/fp16/cmake/DownloadPSimd.cmake +0 -15
  68. package/fp16/configure.py +0 -65
  69. package/fp16/confu.yaml +0 -8
  70. package/fp16/include/fp16/__init__.py +0 -0
  71. package/fp16/include/fp16/avx.py +0 -50
  72. package/fp16/include/fp16/avx2.py +0 -53
  73. package/fp16/include/fp16/bitcasts.h +0 -92
  74. package/fp16/include/fp16/fp16.h +0 -451
  75. package/fp16/include/fp16/psimd.h +0 -131
  76. package/fp16/include/fp16.h +0 -11
  77. package/fp16/jni/Android.mk +0 -6
  78. package/fp16/jni/Application.mk +0 -4
  79. package/fp16/test/alt-from-fp32-value.cc +0 -498
  80. package/fp16/test/alt-to-fp32-bits.cc +0 -263
  81. package/fp16/test/alt-to-fp32-psimd.cc +0 -145
  82. package/fp16/test/alt-to-fp32-value.cc +0 -348
  83. package/fp16/test/alt-to-fp32x2-psimd.cc +0 -245
  84. package/fp16/test/bitcasts.cc +0 -56
  85. package/fp16/test/ieee-from-fp32-value.cc +0 -523
  86. package/fp16/test/ieee-to-fp32-bits.cc +0 -333
  87. package/fp16/test/ieee-to-fp32-psimd.cc +0 -312
  88. package/fp16/test/ieee-to-fp32-value.cc +0 -420
  89. package/fp16/test/ieee-to-fp32x2-psimd.cc +0 -541
  90. package/fp16/test/peachpy/alt-xmm-to-fp32-xmm-avx.cc +0 -96
  91. package/fp16/test/peachpy/alt-xmm-to-fp32-ymm-avx2.cc +0 -96
  92. package/fp16/test/peachpy/stubs.py +0 -38
  93. package/fp16/test/tables.cc +0 -530
  94. package/fp16/test/tables.h +0 -13
  95. package/fp16/third-party/THHalf.h +0 -92
  96. package/fp16/third-party/eigen-half.h +0 -170
  97. package/fp16/third-party/float16-compressor.h +0 -80
  98. package/fp16/third-party/half.hpp +0 -2916
  99. package/fp16/third-party/npy-halffloat.h +0 -328
  100. package/include/usearch/index.hpp +0 -3836
  101. package/include/usearch/index_dense.hpp +0 -2004
  102. package/include/usearch/index_plugins.hpp +0 -2203
  103. package/javascript/lib.cpp +0 -341
  104. package/javascript/types/usearch.d.ts.map +0 -1
  105. package/javascript/usearch.test.js +0 -74
  106. package/package-ci.json +0 -10
  107. package/pyproject.toml +0 -51
  108. package/setup.py +0 -201
  109. package/simsimd/.releaserc +0 -86
  110. package/simsimd/Cargo.lock +0 -708
  111. package/simsimd/Cargo.toml +0 -36
  112. package/simsimd/LICENSE +0 -201
  113. package/simsimd/README.md +0 -275
  114. package/simsimd/binding.gyp +0 -36
  115. package/simsimd/build.rs +0 -20
  116. package/simsimd/include/simsimd/binary.h +0 -201
  117. package/simsimd/include/simsimd/probability.h +0 -548
  118. package/simsimd/include/simsimd/simsimd.h +0 -456
  119. package/simsimd/include/simsimd/spatial.h +0 -1175
  120. package/simsimd/include/simsimd/types.h +0 -207
  121. package/simsimd/javascript/bench.js +0 -127
  122. package/simsimd/javascript/fallback.ts +0 -193
  123. package/simsimd/javascript/lib.c +0 -102
  124. package/simsimd/javascript/node-gyp-build.d.ts +0 -1
  125. package/simsimd/javascript/simsimd.ts +0 -124
  126. package/simsimd/javascript/test.mjs +0 -153
  127. package/simsimd/javascript/tsconfig-base.json +0 -25
  128. package/simsimd/javascript/tsconfig-cjs.json +0 -8
  129. package/simsimd/javascript/tsconfig-esm.json +0 -8
  130. package/simsimd/package-lock.json +0 -1688
  131. package/simsimd/package.json +0 -61
  132. package/simsimd/rust/benches/cosine.rs +0 -27
  133. package/simsimd/rust/benches/native.rs +0 -27
  134. package/simsimd/rust/benches/sqeuclidean.rs +0 -27
  135. package/simsimd/rust/lib.c +0 -68
  136. package/simsimd/rust/lib.rs +0 -232
  137. package/sqlite/README.md +0 -178
  138. package/sqlite/lib.cpp +0 -325
  139. package/stringzilla/CONTRIBUTING.md +0 -429
  140. package/stringzilla/Cargo.lock +0 -25
  141. package/stringzilla/Cargo.toml +0 -26
  142. package/stringzilla/LICENSE +0 -201
  143. package/stringzilla/README.md +0 -1281
  144. package/stringzilla/VERSION +0 -1
  145. package/stringzilla/assets/cover-strinzilla.jpeg +0 -0
  146. package/stringzilla/assets/meme-stringzilla-v2.jpeg +0 -0
  147. package/stringzilla/assets/meme-stringzilla-v3.jpeg +0 -0
  148. package/stringzilla/binding.gyp +0 -16
  149. package/stringzilla/build.rs +0 -14
  150. package/stringzilla/c/lib.c +0 -304
  151. package/stringzilla/cli/README.md +0 -48
  152. package/stringzilla/cli/split.py +0 -72
  153. package/stringzilla/cli/wc.py +0 -37
  154. package/stringzilla/include/stringzilla/experimental.h +0 -724
  155. package/stringzilla/include/stringzilla/module.modulemap +0 -9
  156. package/stringzilla/include/stringzilla/stringzilla.h +0 -5240
  157. package/stringzilla/include/stringzilla/stringzilla.hpp +0 -3830
  158. package/stringzilla/javascript/lib.c +0 -125
  159. package/stringzilla/javascript/stringzilla.js +0 -22
  160. package/stringzilla/package-ci.json +0 -10
  161. package/stringzilla/package.json +0 -32
  162. package/stringzilla/rust/lib.rs +0 -362
  163. package/stringzilla/swift/StringProtocol+StringZilla.swift +0 -280
  164. package/stringzilla/swift/Test.swift +0 -60
  165. package/tsconfig.json +0 -21
  166. package/wasmer.toml +0 -12
  167. package/winlibinstaller.bat +0 -42
  168. /package/{simsimd/javascript/dist-package-cjs.json → javascript/dist/cjs/package.json} +0 -0
  169. /package/{simsimd/javascript/dist-package-esm.json → javascript/dist/esm/package.json} +0 -0
@@ -1,331 +0,0 @@
1
- name: Pre-Release
2
-
3
- on:
4
- push:
5
- branches: ["main-dev"]
6
- pull_request:
7
- branches: ["main-dev"]
8
-
9
- env:
10
- GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
11
- PYTHONUTF8: 1
12
- PYTHON_VERSION: 3.11
13
- DOTNET_VERSION: 7.0.x
14
-
15
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16
- permissions:
17
- contents: read
18
-
19
- jobs:
20
- test_ubuntu_gcc:
21
- name: Ubuntu (GCC 12)
22
- runs-on: ubuntu-22.04
23
- env:
24
- CC: gcc-12
25
- CXX: g++-12
26
-
27
- steps:
28
- - uses: actions/checkout@v3
29
- with:
30
- ref: main-dev
31
- - run: git submodule update --init --recursive
32
-
33
- # C/C++
34
- - name: Build C/C++
35
- run: |
36
- sudo apt update
37
- sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12
38
- cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
39
- cmake --build build_artifacts --config RelWithDebInfo
40
- - name: Test C++
41
- run: ./build_artifacts/test_cpp
42
- - name: Test C
43
- run: ./build_artifacts/test_c
44
-
45
- # Python
46
- - name: Set up Python ${{ env.PYTHON_VERSION }}
47
- uses: actions/setup-python@v4
48
- with:
49
- python-version: ${{ env.PYTHON_VERSION }}
50
- - name: Build Python
51
- run: |
52
- python -m pip install --upgrade pip
53
- pip install pytest numpy
54
- python -m pip install .
55
- - name: Test Python
56
- run: pytest python/scripts/ -s -x
57
-
58
- # JavaScript
59
- - name: Set up Node.js
60
- uses: actions/setup-node@v3
61
- with:
62
- node-version: 20
63
- - name: Build JavaScript
64
- run: npm ci
65
- - name: Test JavaScript
66
- run: npm test
67
-
68
- # Rust
69
- - name: Test Rust
70
- uses: actions-rs/toolchain@v1
71
- with:
72
- toolchain: stable
73
- override: true
74
-
75
- # Java
76
- - name: Setup Java
77
- uses: actions/setup-java@v3
78
- with:
79
- java-version: "11"
80
- distribution: "adopt"
81
- - name: Setup Gradle
82
- uses: gradle/gradle-build-action@v2.4.2
83
- - name: Test Java
84
- run: gradle clean build
85
-
86
- # C#
87
- - name: Setup .NET ${{ env.DOTNET_VERSION }}
88
- uses: actions/setup-dotnet@v3
89
- with:
90
- dotnet-version: ${{ env.DOTNET_VERSION }}
91
- - name: Test .NET
92
- run: |
93
- mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
94
- cp "${{ github.workspace }}/build_artifacts/libusearch_c.so" "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
95
- dotnet test -c Release
96
- shell: bash
97
- working-directory: ${{ github.workspace }}/csharp
98
-
99
- # GoLang
100
- # With `LD_DEBUG=all` we detect the addresses of the libraries that are loaded
101
- - name: Test GoLang
102
- run: |
103
- sudo cp ${{ github.workspace }}/build_artifacts/libusearch_c.so /usr/lib/libusearch_c.so
104
- sudo cp ${{ github.workspace }}/c/usearch.h /usr/include/usearch.h
105
- LD_DEBUG=all go test -v
106
- working-directory: ${{ github.workspace }}/golang/
107
-
108
- test_ubuntu_clang:
109
- name: Ubuntu (Clang 16)
110
- runs-on: ubuntu-22.04
111
- env:
112
- CC: clang-16
113
- CXX: clang++-16
114
-
115
- steps:
116
- - uses: actions/checkout@v3
117
- with:
118
- ref: main-dev
119
- - run: git submodule update --init --recursive
120
-
121
- # C/C++
122
- # Clang 16 isn't available from default repos on Ubuntu 22.04, so we have to install it manually
123
- - name: Build C/C++
124
- run: |
125
- sudo apt update
126
- sudo apt install -y cmake build-essential libjemalloc-dev
127
- wget https://apt.llvm.org/llvm.sh
128
- chmod +x llvm.sh
129
- sudo ./llvm.sh 16
130
- cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=0 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
131
- cmake --build build_artifacts --config RelWithDebInfo
132
- - name: Test C++
133
- run: ./build_artifacts/test_cpp
134
- - name: Test C
135
- run: ./build_artifacts/test_c
136
-
137
- # Python
138
- - name: Set up Python ${{ env.PYTHON_VERSION }}
139
- uses: actions/setup-python@v4
140
- with:
141
- python-version: ${{ env.PYTHON_VERSION }}
142
- - name: Build Python
143
- run: |
144
- python -m pip install --upgrade pip
145
- pip install pytest numpy
146
- python -m pip install .
147
- - name: Test Python
148
- run: pytest python/scripts/ -s -x
149
-
150
- # JavaScript
151
- - name: Set up Node.js
152
- uses: actions/setup-node@v3
153
- with:
154
- node-version: 20
155
- - name: Build and test JavaScript
156
- run: |
157
- npm ci
158
- npm test
159
-
160
- # C#
161
- - name: Setup .NET ${{ env.DOTNET_VERSION }}
162
- uses: actions/setup-dotnet@v3
163
- with:
164
- dotnet-version: ${{ env.DOTNET_VERSION }}
165
- - name: Test .NET
166
- run: |
167
- mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
168
- cp "${{ github.workspace }}/build_artifacts/libusearch_c.so" "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
169
- dotnet test -c Release
170
- shell: bash
171
- working-directory: ${{ github.workspace }}/csharp
172
-
173
- test_macos:
174
- name: MacOS
175
- runs-on: macos-12
176
-
177
- steps:
178
- - uses: actions/checkout@v3
179
- with:
180
- ref: main-dev
181
- - run: git submodule update --init --recursive
182
-
183
- # C/C++
184
- - name: Build C/C++
185
- run: |
186
- brew update
187
- brew install cmake
188
- cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1
189
- cmake --build build_artifacts --config RelWithDebInfo
190
- - name: Test C++
191
- run: ./build_artifacts/test_cpp
192
- - name: Test C
193
- run: ./build_artifacts/test_c
194
-
195
- # Python
196
- - name: Set up Python ${{ env.PYTHON_VERSION }}
197
- uses: actions/setup-python@v4
198
- with:
199
- python-version: ${{ env.PYTHON_VERSION }}
200
- - name: Build Python
201
- run: |
202
- python -m pip install --upgrade pip
203
- pip install pytest numpy
204
- python -m pip install .
205
- - name: Test Python
206
- run: pytest python/scripts/ -s -x
207
-
208
- # JavaScript
209
- - name: Set up Node.js
210
- uses: actions/setup-node@v3
211
- with:
212
- node-version: 20
213
- - name: Build JavaScript
214
- run: npm ci
215
- - name: Test JavaScript
216
- run: npm test
217
-
218
- # ObjC/Swift
219
- - name: Build ObjC/Swift
220
- run: swift build
221
- - name: Test ObjC/Swift
222
- run: swift test
223
-
224
- # C#
225
- - name: Setup .NET ${{ env.DOTNET_VERSION }}
226
- uses: actions/setup-dotnet@v3
227
- with:
228
- dotnet-version: ${{ env.DOTNET_VERSION }}
229
- - name: Test .NET
230
- run: |
231
- mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/osx-x64/native"
232
- cp "${{ github.workspace }}/build_artifacts/libusearch_c.dylib" "${{ github.workspace }}/csharp/lib/runtimes/osx-x64/native"
233
- dotnet test -c Release
234
- shell: bash
235
- working-directory: ${{ github.workspace }}/csharp
236
-
237
- test_windows:
238
- name: Windows
239
- runs-on: windows-2022
240
- steps:
241
- - uses: actions/checkout@v3
242
- with:
243
- ref: main-dev
244
- - run: git submodule update --init --recursive
245
-
246
- # C/C++
247
- - name: Build C/C++
248
- run: |
249
- choco install cmake
250
- cmake -B build_artifacts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1
251
- cmake --build build_artifacts --config RelWithDebInfo
252
- - name: Test C++
253
- run: .\build_artifacts\test_cpp.exe
254
- - name: Test C
255
- run: .\build_artifacts\test_c.exe
256
-
257
- # Python
258
- - name: Set up Python ${{ env.PYTHON_VERSION }}
259
- uses: actions/setup-python@v4
260
- with:
261
- python-version: ${{ env.PYTHON_VERSION }}
262
- - name: Build Python
263
- run: |
264
- python -m pip install --upgrade pip
265
- pip install pytest numpy
266
- python -m pip install .
267
- - name: Test Python
268
- run: pytest python/scripts/ -s -x
269
-
270
- # JavaScript
271
- - name: Set up Node.js
272
- uses: actions/setup-node@v3
273
- with:
274
- node-version: 20
275
- - name: Build JavaScript
276
- run: npm ci
277
- - name: Test JavaScript
278
- run: npm test
279
-
280
- # C#
281
- - name: Setup .NET ${{ env.DOTNET_VERSION }}
282
- uses: actions/setup-dotnet@v3
283
- with:
284
- dotnet-version: ${{ env.DOTNET_VERSION }}
285
- - name: Test .NET
286
- run: |
287
- mkdir -p "${{ github.workspace }}\csharp\lib\runtimes\win-x64\native"
288
- cp "${{ github.workspace }}\build_artifacts\libusearch_c.dll" "${{ github.workspace }}\csharp\lib\runtimes\win-x64\native"
289
- dotnet test -c Release
290
- shell: bash
291
- working-directory: ${{ github.workspace }}/csharp
292
-
293
- build_docker:
294
- name: Docker
295
- runs-on: ubuntu-22.04
296
- steps:
297
- - uses: actions/checkout@v3
298
- - run: git submodule update --init --recursive
299
- - name: Build
300
- uses: docker/build-push-action@v4
301
- with:
302
- context: .
303
- load: true
304
- push: false
305
-
306
-
307
- build_wheels:
308
- name: Build Python ${{ matrix.python-version }} for ${{ matrix.os }}
309
- runs-on: ${{ matrix.os }}
310
- needs: [test_ubuntu_gcc, test_ubuntu_clang, test_macos, test_windows]
311
- strategy:
312
- matrix:
313
- os: [ubuntu-latest, macos-latest, windows-latest]
314
- python-version: ["37", "38", "39", "310", "311", "312"]
315
- steps:
316
- - uses: actions/checkout@v4
317
- - name: Set up Python
318
- uses: actions/setup-python@v5
319
- with:
320
- python-version: 3.x
321
-
322
- # We only need QEMU for Linux builds
323
- - name: Setup QEMU
324
- if: matrix.os == 'ubuntu-latest'
325
- uses: docker/setup-qemu-action@v3
326
- - name: Install cibuildwheel
327
- run: python -m pip install cibuildwheel
328
- - name: Build wheels
329
- run: cibuildwheel --output-dir wheelhouse
330
- env:
331
- CIBW_BUILD: cp${{ matrix.python-version }}-*