usearch 2.6.0 → 2.7.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 (55) hide show
  1. package/. npmignore +14 -0
  2. package/.cmake-format.py +19 -0
  3. package/.github/workflows/Dockerfile.libs +2 -2
  4. package/.github/workflows/prerelease.yml +85 -64
  5. package/.github/workflows/release.yml +24 -15
  6. package/.gitignore +1 -1
  7. package/.vscode/launch.json +47 -14
  8. package/.vscode/settings.json +7 -0
  9. package/.vscode/tasks.json +44 -8
  10. package/CITATION.cff +1 -1
  11. package/CMakeLists.txt +218 -67
  12. package/Cargo.toml +1 -1
  13. package/README.md +1 -1
  14. package/binding.gyp +3 -2
  15. package/build.gradle +19 -10
  16. package/c/CMakeLists.txt +21 -48
  17. package/c/README.md +5 -5
  18. package/c/lib.cpp +52 -7
  19. package/c/test.c +137 -94
  20. package/c/usearch.h +42 -0
  21. package/cmake/clipp.cmake +0 -1
  22. package/cmake/jemalloc.cmake +21 -37
  23. package/conanfile.py +1 -1
  24. package/cpp/CMakeLists.txt +14 -123
  25. package/cpp/README.md +26 -22
  26. package/cpp/bench.cpp +0 -12
  27. package/cpp/test.cpp +29 -1
  28. package/csharp/nuget/nuget-package.props +1 -1
  29. package/docs/compilation.md +23 -16
  30. package/docs/conf.py +1 -1
  31. package/golang/README.md +52 -51
  32. package/golang/lib.go +1 -1
  33. package/golang/lib_test.go +4 -1
  34. package/include/usearch/index.hpp +2 -2
  35. package/include/usearch/index_plugins.hpp +345 -160
  36. package/javascript/lib.cpp +204 -250
  37. package/javascript/usearch.js +440 -2
  38. package/javascript/usearch.test.js +37 -0
  39. package/package.json +10 -5
  40. package/python/lib.cpp +95 -224
  41. package/python/scripts/bench_exact.py +2 -2
  42. package/python/scripts/test_jit.py +2 -13
  43. package/python/scripts/test_sparse.py +1 -1
  44. package/python/scripts/test_tooling.py +15 -5
  45. package/rust/lib.cpp +7 -4
  46. package/rust/lib.hpp +2 -0
  47. package/rust/lib.rs +128 -8
  48. package/setup.py +14 -4
  49. package/wasm/CMakeLists.txt +4 -12
  50. package/wasm/lib.cpp +1 -1
  51. package/wasmer.toml +1 -1
  52. package/javascript/docs.js +0 -111
  53. package/javascript/test.js +0 -32
  54. package/javascript/usearch.d.ts +0 -110
  55. package/tsconfig.json +0 -8
package/. npmignore ADDED
@@ -0,0 +1,14 @@
1
+ node_modules/
2
+ .vscode/
3
+ build/
4
+ csharp/
5
+ golang/
6
+ java/
7
+ objc/
8
+ rust/
9
+ swift/
10
+ wolfram/
11
+ python/
12
+ docs/
13
+ wasm/
14
+ Package.swift
@@ -0,0 +1,19 @@
1
+ # -----------------------------
2
+ # Options effecting formatting.
3
+ # -----------------------------
4
+ with section("format"):
5
+ # How wide to allow formatted cmake files
6
+ line_width = 120
7
+
8
+ # How many spaces to tab for indent
9
+ tab_size = 4
10
+
11
+ # If true, separate flow control names from their parentheses with a space
12
+ separate_ctrl_name_with_space = True
13
+
14
+ # If true, separate function names from parentheses with a space
15
+ separate_fn_name_with_space = False
16
+
17
+ # If a statement is wrapped to more than one line, than dangle the closing
18
+ # parenthesis on its own line.
19
+ dangle_parens = True
@@ -14,7 +14,7 @@ RUN apt-get update && \
14
14
  COPY . .
15
15
 
16
16
  RUN cd golang && make -C ../c libusearch_c.so && \
17
- mv ../c/libusearch_c.so libusearch.a && cp ../c/usearch.h usearch.h && \
17
+ mv ../c/libusearch_c.so libusearch_static_c.a && cp ../c/usearch.h usearch.h && \
18
18
  go test -v && cd ..
19
19
 
20
20
  RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
@@ -28,7 +28,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
28
28
  mkdir -p usearch_linux_"$arch"_"$version"/usr/local/lib && \
29
29
  mkdir usearch_linux_"$arch"_"$version"/usr/local/include && \
30
30
  cp c/usearch.h usearch_linux_"$arch"_"$version"/usr/local/include/ && \
31
- cp golang/libusearch.a usearch_linux_"$arch"_"$version"/usr/local/lib/ && \
31
+ cp golang/libusearch_static_c.a usearch_linux_"$arch"_"$version"/usr/local/lib/ && \
32
32
  echo "Package: usearch\nVersion: $version\nMaintainer: Ashot Vardanian\nArchitecture: "$arch"\nDescription: Faster & Smaller Single-File Search Engine for Vectors & Texts" > usearch_linux_"$arch"_"$version"/DEBIAN/control && \
33
33
  dpkg-deb --build usearch_linux_"$arch"_"$version" && \
34
34
  sshpass -p "$user_pass" scp -o StrictHostKeyChecking=no usearch_linux_"$arch"_"$version".deb "$user_name"@"$docker_ip":/home/$user_name/work/usearch/usearch/
@@ -16,59 +16,102 @@ permissions:
16
16
  contents: read
17
17
 
18
18
  jobs:
19
-
20
- test_c:
21
- name: Test C
19
+
20
+ test_cpp_c_ubuntu_gcc:
21
+ name: Test C++ Ubuntu (GCC)
22
22
  runs-on: ubuntu-latest
23
+
23
24
  steps:
24
25
  - uses: actions/checkout@v3
25
26
  with:
26
27
  ref: main-dev
27
28
  - run: git submodule update --init --recursive
28
- - name: Prepare Environment
29
- run: |
30
- sudo apt update &&
31
- sudo apt install -y cmake g++-12 build-essential libjemalloc-dev
29
+
30
+ - name: Install Dependencies
31
+ run: sudo apt update && sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev g++-12
32
+
32
33
  - name: Build
33
34
  run: |
34
- cmake -B ./build_release \
35
- -DCMAKE_CXX_COMPILER="g++-12" \
36
- -DCMAKE_BUILD_TYPE=Release \
37
- -DUSEARCH_BUILD_CTEST=1 \
38
- -DUSEARCH_USE_OPENMP=1 \
39
- -DUSEARCH_USE_SIMSIMD=1 \
40
- -DUSEARCH_USE_JEMALLOC=1 \
41
- -DUSEARCH_BUILD_BENCHMARK=0 &&
42
- make -C ./build_release -j
43
- - name: Run tests
44
- run: ./build_release/test_c
35
+ export CC=gcc-12
36
+ export CXX=g++-12
37
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
38
+ cmake --build build --config Debug
39
+
40
+ - name: Run C++ tests
41
+ run: ./build/test_cpp
42
+ - name: Run C tests
43
+ run: ./build/test_c
44
+
45
45
 
46
- test_cpp:
47
- name: Test C++
46
+ test_cpp_c_ubuntu_clang:
47
+ name: Test C++ Ubuntu (Clang)
48
48
  runs-on: ubuntu-latest
49
+
49
50
  steps:
50
51
  - uses: actions/checkout@v3
51
52
  with:
52
53
  ref: main-dev
53
54
  - run: git submodule update --init --recursive
54
- - name: Prepare Environment
55
+
56
+ - name: Install Dependencies
57
+ run: sudo apt update && sudo apt install -y cmake build-essential libjemalloc-dev clang-15
58
+
59
+ - name: Build
55
60
  run: |
56
- sudo apt update &&
57
- sudo apt install -y cmake g++-12 build-essential libjemalloc-dev
61
+ export CC=clang-15
62
+ export CXX=clang++-15
63
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
64
+ cmake --build build --config Debug
65
+
66
+ - name: Run C++ tests
67
+ run: ./build/test_cpp
68
+ - name: Run C tests
69
+ run: ./build/test_c
70
+
71
+
72
+ test_cpp_c_macos:
73
+ name: Test C++ MacOS
74
+ runs-on: macos-latest
75
+ steps:
76
+ - uses: actions/checkout@v3
77
+ with:
78
+ ref: main-dev
79
+ - run: git submodule update --init --recursive
80
+
81
+ - name: Install Dependencies
82
+ run: |
83
+ brew update
84
+ brew install cmake
85
+
58
86
  - name: Build
59
87
  run: |
60
- cmake -B ./build_release \
61
- -DCMAKE_CXX_COMPILER="g++-12" \
62
- -DCMAKE_BUILD_TYPE=Release \
63
- -DUSEARCH_BUILD_TEST=1 \
64
- -DUSEARCH_USE_OPENMP=1 \
65
- -DUSEARCH_USE_SIMSIMD=1 \
66
- -DUSEARCH_USE_JEMALLOC=1 \
67
- -DUSEARCH_BUILD_BENCHMARK=0 &&
68
- make -C ./build_release -j
69
- - name: Run tests
70
- run: ./build_release/test
71
-
88
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1
89
+ cmake --build build --config Debug
90
+ - name: Run C++ tests
91
+ run: ./build/test_cpp
92
+ - name: Run C tests
93
+ run: ./build/test_c
94
+
95
+ test_cpp_c_windows:
96
+ name: Test C++ Windows
97
+ runs-on: windows-latest
98
+ steps:
99
+ - uses: actions/checkout@v3
100
+ with:
101
+ ref: main-dev
102
+ - run: git submodule update --init --recursive
103
+
104
+ - name: Install Dependencies
105
+ run: choco install cmake
106
+
107
+ - name: Build
108
+ run: |
109
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1
110
+ cmake --build build --config Debug
111
+ - name: Run C++ tests
112
+ run: .\build\test_cpp
113
+ - name: Run C tests
114
+ run: .\build\test_c
72
115
 
73
116
  test_python_311:
74
117
  name: Test Python
@@ -90,16 +133,8 @@ jobs:
90
133
  run: |
91
134
  python -m pip install --upgrade pip
92
135
  pip install pytest numpy
93
- - name: Build locally on Ubuntu
94
- run: |
95
- export CC=/usr/bin/gcc-12
96
- export CXX=/usr/bin/g++-12
97
- export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/:$LD_LIBRARY_PATH
98
- python -m pip install .
99
- if: ${{ matrix.os == 'ubuntu-22.04' }}
100
136
  - name: Build locally
101
137
  run: python -m pip install .
102
- if: ${{ matrix.os != 'ubuntu-22.04' }}
103
138
  - name: Test with PyTest
104
139
  run: pytest python/scripts/ -s -x
105
140
 
@@ -128,13 +163,7 @@ jobs:
128
163
  pip install pytest numpy
129
164
 
130
165
  - name: Build locally
131
- run: |
132
- export CC=/usr/bin/gcc-12
133
- export CXX=/usr/bin/g++-12
134
- export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/:$LD_LIBRARY_PATH
135
- python -m pip install .
136
- if: ${{ matrix.os == 'ubuntu-22.04' }}
137
-
166
+ run: python -m pip install .
138
167
  - name: Test with PyTest
139
168
  run: pytest python/scripts/ -s -x
140
169
 
@@ -148,10 +177,7 @@ jobs:
148
177
  - uses: actions/setup-node@v3
149
178
  with:
150
179
  node-version: 18
151
- - run: |
152
- export CC=/usr/bin/gcc-12
153
- export CXX=/usr/bin/g++-12
154
- npm install
180
+ - run: npm install
155
181
  - run: npm ci
156
182
  - run: npm test
157
183
 
@@ -179,10 +205,7 @@ jobs:
179
205
  - name: Setup Gradle
180
206
  uses: gradle/gradle-build-action@v2.4.2
181
207
  - name: Execute Gradle build
182
- run:
183
- export CC=/usr/bin/gcc-12
184
- export CXX=/usr/bin/g++-12
185
- gradle clean build
208
+ run: gradle clean build
186
209
 
187
210
  test_swift:
188
211
  name: Test ObjC & Swift
@@ -253,16 +276,14 @@ jobs:
253
276
  - name: Prepare environment
254
277
  run: |
255
278
  sudo apt update &&
256
- sudo apt install -y cmake g++-12 build-essential libjemalloc-dev
279
+ sudo apt install -y build-essential
257
280
 
258
281
  - name: Build library
259
282
  run: |
260
283
  cd golang/
261
- export CC=/usr/bin/gcc-12
262
- export CXX=/usr/bin/g++-12
263
- make -C ../c libusearch_c.so
264
- sudo mv ../c/libusearch_c.so /usr/local/lib/libusearch.a
265
- sudo mv ../c/usearch.h /usr/local/include/usearch.h
284
+ make USEARCH_USE_OPENMP=0 USEARCH_USE_NATIVE_F16=0 USEARCH_USE_SIMSIMD=1 -C ../c libusearch_c.so
285
+ sudo cp ../c/libusearch_c.so /usr/local/lib/libusearch_c.a
286
+ sudo cp ../c/usearch.h /usr/local/include/usearch.h
266
287
 
267
288
  - name: Run test
268
289
  run: |
@@ -144,8 +144,8 @@ jobs:
144
144
 
145
145
  - name: Build library
146
146
  run: |
147
- cd c/ && g++ -std=c++11 -o libusearch.dll -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared && cd ..
148
- cp c/libusearch.dll golang/libusearch.dll && cp c/usearch.h golang/usearch.h
147
+ cd c/ && g++ -std=c++11 -o libusearch_c.dll -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared && cd ..
148
+ cp c/libusearch_c.dll golang/libusearch_c.dll && cp c/usearch.h golang/usearch.h
149
149
 
150
150
  - name: Golang test
151
151
  run: |
@@ -155,7 +155,7 @@ jobs:
155
155
  - name: Compress library
156
156
  run: |
157
157
  cd golang/
158
- tar -cvf usearch_windows_${{ matrix.arch }}_${{ steps.set_version.outputs.version }}.tar .\libusearch.dll .\usearch.h
158
+ tar -cvf usearch_windows_${{ matrix.arch }}_${{ steps.set_version.outputs.version }}.tar .\libusearch_c.dll .\usearch.h
159
159
 
160
160
  - name: Upload archive
161
161
  uses: xresloader/upload-to-github-release@v1
@@ -192,9 +192,9 @@ jobs:
192
192
 
193
193
  - name: Build library
194
194
  run: |
195
- cd c/ && clang++ -std=c++11 -o libusearch.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared -target ${{ matrix.arch }}-apple-macos11 && cd ..
195
+ cd c/ && clang++ -std=c++11 -o libusearch_c.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared -target ${{ matrix.arch }}-apple-macos11 && cd ..
196
196
  cp c/usearch.h golang/
197
- cp c/libusearch.so golang/libusearch.so
197
+ cp c/libusearch_c.so golang/libusearch_c.so
198
198
 
199
199
  - name: Golang test
200
200
  run: |
@@ -205,7 +205,7 @@ jobs:
205
205
  - name: Compress library
206
206
  run: |
207
207
  cd golang/
208
- zip -r usearch_macOS_${{ matrix.arch }}_${{ steps.version.outputs.version }}.zip libusearch.so usearch.h
208
+ zip -r usearch_macOS_${{ matrix.arch }}_${{ steps.version.outputs.version }}.zip libusearch_c.so usearch.h
209
209
 
210
210
  - name: Upload archive
211
211
  uses: xresloader/upload-to-github-release@v1
@@ -249,9 +249,9 @@ jobs:
249
249
  cd ./c
250
250
  for arch in "${archs[@]}"
251
251
  do
252
- ../wasi-sdk-20.0/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
253
- tar -czvf usearch_wasm_linux_"$arch"_${{ steps.version.outputs.version }}.tar.gz libusearch.so
254
- mv usearch_wasm_linux_"$arch"_${{ steps.version.outputs.version }}.tar.gz ../ && rm -rf libusearch.so
252
+ ../wasi-sdk-20.0/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch_c.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
253
+ tar -czvf usearch_wasm_linux_"$arch"_${{ steps.version.outputs.version }}.tar.gz libusearch_c.so
254
+ mv usearch_wasm_linux_"$arch"_${{ steps.version.outputs.version }}.tar.gz ../ && rm -rf libusearch_c.so
255
255
  done
256
256
  if: matrix.os == 'ubuntu-22.04'
257
257
 
@@ -267,9 +267,9 @@ jobs:
267
267
  cd ./c
268
268
  for arch in "${archs[@]}"
269
269
  do
270
- ../wasi-sdk-20.0/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
271
- zip -r usearch_wasm_macos_"$arch"_${{ steps.version.outputs.version }}.zip libusearch.so
272
- mv usearch_wasm_macos_"$arch"_${{ steps.version.outputs.version }}.zip ../ && rm -rf libusearch.so
270
+ ../wasi-sdk-20.0/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch_c.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
271
+ zip -r usearch_wasm_macos_"$arch"_${{ steps.version.outputs.version }}.zip libusearch_c.so
272
+ mv usearch_wasm_macos_"$arch"_${{ steps.version.outputs.version }}.zip ../ && rm -rf libusearch_c.so
273
273
  done
274
274
  if: matrix.os == 'macOS-11'
275
275
 
@@ -285,9 +285,9 @@ jobs:
285
285
  cd ./c
286
286
  for arch in "${archs[@]}"
287
287
  do
288
- ../wasi-sdk-20.0+m/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
289
- tar -cvf usearch_wasm_windows_"$arch"_${{ steps.version.outputs.version }}.tar.gz libusearch.so
290
- mv usearch_wasm_windows_"$arch"_${{ steps.version.outputs.version }}.tar.gz ../ && rm -rf libusearch.so
288
+ ../wasi-sdk-20.0+m/bin/clang++ --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -o libusearch_c.so -O3 lib.cpp -I. -I ../include/ -I ../fp16/include/ -shared --target=wasm32-wasi-threads -Wl,--no-entry -nostdlib -D_WASI_EMULATED_MMAN -march="$arch"
289
+ tar -cvf usearch_wasm_windows_"$arch"_${{ steps.version.outputs.version }}.tar.gz libusearch_c.so
290
+ mv usearch_wasm_windows_"$arch"_${{ steps.version.outputs.version }}.tar.gz ../ && rm -rf libusearch_c.so
291
291
  done
292
292
  shell: bash
293
293
  if: matrix.os == 'windows-2022'
@@ -418,6 +418,13 @@ jobs:
418
418
  verbose: true
419
419
  print-hash: true
420
420
 
421
+ - name: Publish to Anaconda
422
+ run: |
423
+ pip install anaconda-client
424
+ export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_API_TOKEN }}
425
+ anaconda login --token $ANACONDA_API_TOKEN
426
+ anaconda upload -u unum-cloud ./dist/artifact/*.tar.bz2
427
+
421
428
  publish_javascript:
422
429
  name: Publish JavaScript
423
430
  needs: versioning
@@ -477,6 +484,8 @@ jobs:
477
484
  - name: Publish package
478
485
  run: gradle publish
479
486
  env:
487
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
488
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
480
489
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
481
490
 
482
491
  publish_swift:
package/.gitignore CHANGED
@@ -10,6 +10,7 @@
10
10
  datasets
11
11
  bin
12
12
  *.usearch
13
+ .cache
13
14
 
14
15
  # C++ builds
15
16
  build
@@ -18,7 +19,6 @@ build_debug
18
19
  _deps
19
20
  CMakeCache.txt
20
21
  CMakeFiles
21
- Makefile
22
22
  cmake_install.cmake
23
23
 
24
24
  # Profiling with GProf and `perf` on Linux
@@ -1,14 +1,11 @@
1
1
  {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
2
  "version": "0.2.0",
6
3
  "configurations": [
7
4
  {
8
5
  "name": "Unit Test C++",
9
6
  "type": "cppdbg",
10
7
  "request": "launch",
11
- "program": "${workspaceFolder}/build_debug/test",
8
+ "program": "${workspaceFolder}/build_debug/test_cpp",
12
9
  "cwd": "${workspaceFolder}",
13
10
  "environment": [
14
11
  {
@@ -22,19 +19,55 @@
22
19
  ],
23
20
  "stopAtEntry": false,
24
21
  "linux": {
25
- "preLaunchTask": "Linux Build C++ Debug",
22
+ "preLaunchTask": "Linux Build Debug",
26
23
  "MIMode": "gdb"
27
24
  },
28
25
  "osx": {
29
- "preLaunchTask": "MacOS Build C++ Debug",
26
+ "preLaunchTask": "MacOS Build Debug",
30
27
  "MIMode": "lldb"
28
+ },
29
+ "windows": {
30
+ "preLaunchTask": "Windows Build Debug",
31
+ "type": "cppvsdbg",
32
+ "program": "${workspaceFolder}/build_debug/test_cpp.exe"
33
+ }
34
+ },
35
+ {
36
+ "name": "Unit Test C",
37
+ "type": "cppdbg",
38
+ "request": "launch",
39
+ "program": "${workspaceFolder}/build_debug/test_c",
40
+ "cwd": "${workspaceFolder}",
41
+ "environment": [
42
+ {
43
+ "name": "ASAN_OPTIONS",
44
+ "value": "detect_leaks=0:atexit=1:strict_init_order=1:strict_string_checks=1:abort_on_error=0"
45
+ },
46
+ {
47
+ "name": "LSAN_OPTIONS",
48
+ "value": "verbosity=1:log_threads=1"
49
+ }
50
+ ],
51
+ "stopAtEntry": false,
52
+ "linux": {
53
+ "preLaunchTask": "Linux Build Debug",
54
+ "MIMode": "gdb"
55
+ },
56
+ "osx": {
57
+ "preLaunchTask": "MacOS Build Debug",
58
+ "MIMode": "lldb"
59
+ },
60
+ "windows": {
61
+ "preLaunchTask": "Windows Build Debug",
62
+ "type": "cppvsdbg",
63
+ "program": "${workspaceFolder}/build_debug/test_c.exe"
31
64
  }
32
65
  },
33
66
  {
34
67
  "name": "Debug C++ on Wiki 1M @Cos",
35
68
  "type": "cppdbg",
36
69
  "request": "launch",
37
- "program": "${workspaceFolder}/build_debug/bench",
70
+ "program": "${workspaceFolder}/build_debug/bench_cpp",
38
71
  "cwd": "${workspaceFolder}",
39
72
  "args": [
40
73
  "--vectors",
@@ -53,7 +86,7 @@
53
86
  ],
54
87
  "stopAtEntry": false,
55
88
  "linux": {
56
- "preLaunchTask": "Linux Build C++ Debug",
89
+ "preLaunchTask": "Linux Build Debug",
57
90
  "MIMode": "gdb",
58
91
  "environment": [
59
92
  {
@@ -63,7 +96,7 @@
63
96
  ]
64
97
  },
65
98
  "osx": {
66
- "preLaunchTask": "MacOS Build C++ Debug",
99
+ "preLaunchTask": "MacOS Build Debug",
67
100
  "MIMode": "lldb"
68
101
  }
69
102
  },
@@ -71,7 +104,7 @@
71
104
  "name": "Debug C++ on Text-to-Image 1B @Cos",
72
105
  "type": "cppdbg",
73
106
  "request": "launch",
74
- "program": "${workspaceFolder}/build_debug/bench",
107
+ "program": "${workspaceFolder}/build_debug/bench_cpp",
75
108
  "cwd": "${workspaceFolder}",
76
109
  "args": [
77
110
  "--vectors",
@@ -90,11 +123,11 @@
90
123
  ],
91
124
  "stopAtEntry": false,
92
125
  "linux": {
93
- "preLaunchTask": "Linux Build C++ Debug",
126
+ "preLaunchTask": "Linux Build Debug",
94
127
  "MIMode": "gdb"
95
128
  },
96
129
  "osx": {
97
- "preLaunchTask": "MacOS Build C++ Debug",
130
+ "preLaunchTask": "MacOS Build Debug",
98
131
  "MIMode": "lldb"
99
132
  }
100
133
  },
@@ -102,7 +135,7 @@
102
135
  "name": "Run C++ on Text-to-Image 1M @Cos",
103
136
  "type": "cppdbg",
104
137
  "request": "launch",
105
- "program": "${workspaceFolder}/build_release/bench",
138
+ "program": "${workspaceFolder}/build_release/bench_cpp",
106
139
  "cwd": "${workspaceFolder}",
107
140
  "args": [
108
141
  "--vectors",
@@ -113,7 +146,7 @@
113
146
  "datasets/t2i_1M/groundtruth.public.100K.ibin",
114
147
  ],
115
148
  "stopAtEntry": false,
116
- "preLaunchTask": "Linux Build C++ Release",
149
+ "preLaunchTask": "Linux Build Release",
117
150
  "MIMode": "gdb"
118
151
  },
119
152
  {
@@ -113,10 +113,13 @@
113
113
  "BLAS",
114
114
  "Cdecl",
115
115
  "cflags",
116
+ "cibuildwheel",
116
117
  "citerator",
117
118
  "downcasted",
118
119
  "Downcasting",
119
120
  "dtype",
121
+ "DUSEARCH",
122
+ "emcmake",
120
123
  "equi",
121
124
  "equidimensional",
122
125
  "FAISS",
@@ -128,6 +131,7 @@
128
131
  "ibin",
129
132
  "jaccard",
130
133
  "libusearch",
134
+ "linalg",
131
135
  "longlong",
132
136
  "memmap",
133
137
  "Napi",
@@ -144,12 +148,15 @@
144
148
  "simsimd",
145
149
  "SLOC",
146
150
  "sorensen",
151
+ "Struct",
147
152
  "tanimoto",
148
153
  "tqdm",
149
154
  "uninitialize",
150
155
  "unumusearch",
151
156
  "usearch",
152
157
  "usecases",
158
+ "Vardanian",
159
+ "vectorize",
153
160
  "Xunit"
154
161
  ],
155
162
  "autoDocstring.docstringFormat": "sphinx",
@@ -2,8 +2,8 @@
2
2
  "version": "2.0.0",
3
3
  "tasks": [
4
4
  {
5
- "label": "Linux Build C++ Debug",
6
- "command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && make -C ./build_debug",
5
+ "label": "Linux Build Debug",
6
+ "command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && cmake --build ./build_debug --config Debug",
7
7
  "args": [],
8
8
  "type": "shell",
9
9
  "problemMatcher": [
@@ -11,8 +11,8 @@
11
11
  ]
12
12
  },
13
13
  {
14
- "label": "Linux Build C++ Release",
15
- "command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_BUILD_TYPE=RelWithDebInfo -B ./build_release && make -C ./build_release",
14
+ "label": "Linux Build Release",
15
+ "command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Release -B ./build_release && cmake --build ./build_release --config RelWithDebInfo",
16
16
  "args": [],
17
17
  "type": "shell",
18
18
  "problemMatcher": [
@@ -20,16 +20,52 @@
20
20
  ]
21
21
  },
22
22
  {
23
- "label": "MacOS Build C++ Debug",
24
- "command": "cmake -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && make -C ./build_debug",
23
+ "label": "MacOS Build Debug",
24
+ "command": "cmake -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && cmake --build ./build_debug --config Debug",
25
25
  "args": [],
26
26
  "type": "shell",
27
27
  },
28
28
  {
29
- "label": "MacOS Build C++ Release",
30
- "command": "cmake -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -B ./build_release && make -C ./build_release",
29
+ "label": "MacOS Build Release",
30
+ "command": "cmake -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Release -B ./build_release && cmake --build ./build_release --config RelWithDebInfo",
31
31
  "args": [],
32
32
  "type": "shell"
33
+ },
34
+ {
35
+ "label": "Windows Build Debug",
36
+ "command": "cmake -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && cmake --build ./build_debug --config Debug",
37
+ "args": [],
38
+ "type": "shell",
39
+ "problemMatcher": [
40
+ "$msCompile"
41
+ ],
42
+ "options": {
43
+ "shell": {
44
+ "executable": "cmd.exe",
45
+ "args": [
46
+ "/d",
47
+ "/c"
48
+ ]
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "label": "Windows Build Release",
54
+ "command": "cmake -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DCMAKE_BUILD_TYPE=Release -B ./build_release && cmake --build ./build_release --config RelWithDebInfo",
55
+ "args": [],
56
+ "type": "shell",
57
+ "problemMatcher": [
58
+ "$msCompile"
59
+ ],
60
+ "options": {
61
+ "shell": {
62
+ "executable": "cmd.exe",
63
+ "args": [
64
+ "/d",
65
+ "/c"
66
+ ]
67
+ }
68
+ }
33
69
  }
34
70
  ]
35
71
  }
package/CITATION.cff CHANGED
@@ -5,7 +5,7 @@ authors:
5
5
  given-names: "Ash"
6
6
  orcid: "https://orcid.org/0000-0002-4882-1815"
7
7
  title: "USearch by Unum Cloud"
8
- version: 2.6.0
8
+ version: 2.7.0
9
9
  doi: 10.5281/zenodo.7949416
10
10
  date-released: 2022-06-12
11
11
  url: "https://github.com/unum-cloud/usearch"