usearch 0.21.0 → 0.22.1
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.
- package/.github/workflows/prerelease.yml +19 -0
- package/.github/workflows/release.yml +32 -1
- package/.github/workflows/update_version.sh +2 -1
- package/CMakeLists.txt +4 -0
- package/Cargo.toml +1 -1
- package/README.md +117 -626
- package/c/lib.cpp +19 -15
- package/c/usearch.h +26 -23
- package/cmake/emscripten.cmake +8 -0
- package/conanfile.py +1 -1
- package/cpp/README.md +88 -0
- package/cpp/bench.cpp +32 -41
- package/cpp/test.cpp +13 -7
- package/docs/golang/index.rst +6 -0
- package/docs/index.rst +6 -2
- package/docs/javascript/index.rst +1 -1
- package/docs/python/index.rst +1 -1
- package/docs/python/reference.rst +9 -2
- package/docs/rust/index.rst +6 -0
- package/docs/swift/index.rst +6 -0
- package/golang/README.md +28 -0
- package/include/usearch/index.hpp +204 -78
- package/include/usearch/index_punned_dense.hpp +239 -85
- package/java/README.md +22 -0
- package/javascript/README.md +36 -0
- package/javascript/lib.cpp +1 -1
- package/package.json +1 -1
- package/python/README.md +283 -0
- package/python/lib.cpp +61 -11
- package/python/scripts/join.py +7 -3
- package/python/scripts/test.py +28 -243
- package/python/scripts/test_jit.py +244 -0
- package/python/usearch/index.py +97 -25
- package/rust/README.md +67 -0
- package/swift/README.md +20 -0
- package/wasm/CMakeLists.txt +15 -0
- package/wasm/README.md +13 -0
- package/wasm/lib.cpp +5 -0
- package/wasmer.toml +8 -0
- package/wolfram/README.md +13 -0
|
@@ -148,6 +148,25 @@ jobs:
|
|
|
148
148
|
- name: Run tests
|
|
149
149
|
run: swift test
|
|
150
150
|
|
|
151
|
+
test_wasm:
|
|
152
|
+
name: Test WASM
|
|
153
|
+
runs-on: ubuntu-latest
|
|
154
|
+
steps:
|
|
155
|
+
- uses: actions/checkout@v3
|
|
156
|
+
- run: git submodule update --init --recursive
|
|
157
|
+
- name: Prepare WASM Environment
|
|
158
|
+
run: |
|
|
159
|
+
sudo apt update &&
|
|
160
|
+
sudo apt install -y nodejs
|
|
161
|
+
git clone https://github.com/emscripten-core/emsdk.git
|
|
162
|
+
./emsdk/emsdk install latest
|
|
163
|
+
- name: Build USearch by Emscripten
|
|
164
|
+
run: |
|
|
165
|
+
./emsdk/emsdk activate latest && source ./emsdk/emsdk_env.sh
|
|
166
|
+
emcmake cmake -B ./build -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -s TOTAL_MEMORY=64MB" && emmake make -C ./build
|
|
167
|
+
- name: Run tests
|
|
168
|
+
run: node ./build/test.js
|
|
169
|
+
|
|
151
170
|
build_docker:
|
|
152
171
|
name: Test Docker Image
|
|
153
172
|
runs-on: ubuntu-latest
|
|
@@ -270,13 +270,44 @@ jobs:
|
|
|
270
270
|
push: true
|
|
271
271
|
tags: ${{ steps.meta.outputs.tags }}
|
|
272
272
|
labels: ${{ steps.meta.outputs.labels }}
|
|
273
|
+
|
|
274
|
+
publish_wasm:
|
|
275
|
+
name: WASM Build
|
|
276
|
+
needs: versioning
|
|
277
|
+
runs-on: ubuntu-latest
|
|
278
|
+
permissions:
|
|
279
|
+
contents: read
|
|
280
|
+
packages: write
|
|
281
|
+
|
|
282
|
+
steps:
|
|
283
|
+
- uses: actions/checkout@v3
|
|
284
|
+
with:
|
|
285
|
+
ref: 'main'
|
|
286
|
+
- run: git submodule update --init --recursive
|
|
287
|
+
|
|
288
|
+
- name: Prepare WASM Environment
|
|
289
|
+
run: |
|
|
290
|
+
git clone https://github.com/emscripten-core/emsdk.git
|
|
291
|
+
./emsdk/emsdk install latest
|
|
292
|
+
|
|
293
|
+
- name: Build USearch WASM by Emscripten
|
|
294
|
+
run: |
|
|
295
|
+
./emsdk/emsdk activate latest && source ./emsdk/emsdk_env.sh
|
|
296
|
+
emcmake cmake -DUSEARCH_BUILD_TEST=0 -DUSEARCH_BUILD_BENCHMARK=0 -DUSEARCH_BUILD_WASM=1 -B ./build && emmake make -C ./build
|
|
297
|
+
|
|
298
|
+
- name: Trigger Wasmer.io CLI
|
|
299
|
+
run: |
|
|
300
|
+
curl https://get.wasmer.io -sSfL | sh
|
|
301
|
+
source ~/.wasmer/wasmer.sh
|
|
302
|
+
wasmer login --token "${{ secrets.WASMER_TOKEN }}"
|
|
303
|
+
wasmer publish
|
|
273
304
|
|
|
274
305
|
|
|
275
306
|
build_docs:
|
|
276
307
|
name: Build Docs
|
|
277
308
|
runs-on: ubuntu-22.04
|
|
278
309
|
if: ${{ always() }}
|
|
279
|
-
needs: [publish_python, publish_javascript, publish_rust, publish_java, publish_swift, publish_docker]
|
|
310
|
+
needs: [publish_python, publish_javascript, publish_rust, publish_java, publish_swift, publish_docker, publish_wasm]
|
|
280
311
|
permissions:
|
|
281
312
|
contents: write
|
|
282
313
|
steps:
|
|
@@ -9,4 +9,5 @@ echo $1 > VERSION &&
|
|
|
9
9
|
sed -i "s/^\(#define USEARCH_VERSION_MINOR \).*/\1$(echo "$1" | cut -d. -f2)/" ./include/usearch/index.hpp &&
|
|
10
10
|
sed -i "s/^\(#define USEARCH_VERSION_PATCH \).*/\1$(echo "$1" | cut -d. -f3)/" ./include/usearch/index.hpp &&
|
|
11
11
|
sed -i "s/<version>[0-9]\+\.[0-9]\+\.[0-9]\+/<version>$1/" README.md &&
|
|
12
|
-
sed -i "s/version = {0\.[0-9]\+\.[0-9]\+}/version = {$1}/" README.md
|
|
12
|
+
sed -i "s/version = {0\.[0-9]\+\.[0-9]\+}/version = {$1}/" README.md &&
|
|
13
|
+
sed -i "s/version=\".*\"/version=\"$1\"/" wasmer.toml
|
package/CMakeLists.txt
CHANGED
package/Cargo.toml
CHANGED