From 28231339308715268b58b81aff11f60398581e45 Mon Sep 17 00:00:00 2001 From: Seedking <875828815@qq.com> Date: Mon, 4 Mar 2024 12:06:48 +0800 Subject: [PATCH] add simsimd --- packages/s/simsimd/xmake.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/s/simsimd/xmake.lua diff --git a/packages/s/simsimd/xmake.lua b/packages/s/simsimd/xmake.lua new file mode 100644 index 000000000..79690d920 --- /dev/null +++ b/packages/s/simsimd/xmake.lua @@ -0,0 +1,22 @@ +package("simsimd") + set_homepage("https://ashvardanian.com/posts/simsimd-faster-scipy/") + set_description("Vector Similarity Functions 3x-200x Faster than SciPy and NumPy — for Python, JavaScript, Rust, and C 11, supporting f64, f32, f16, i8, and binary vectors using SIMD for both x86 AVX2 & AVX-512 and Arm NEON & SVE 📐") + set_license("Apache-2.0") + + add_urls("https://github.com/ashvardanian/SimSIMD/archive/refs/tags/$(version).tar.gz", + "https://github.com/ashvardanian/SimSIMD.git") + + add_versions("v3.9.0", "8e79b628ba89beebc7c4c853323db0e10ebb6f85bcda2641e1ebaf77cfbda7f9") + + on_install(function (package) + os.cp("include/simsimd/spatial.h", package:installdir("include")) + os.cp("include/simsimd/probability.h", package:installdir("include")) + os.cp("include/simsimd/simsimd.h", package:installdir("include")) + os.cp("include/simsimd/binary.h", package:installdir("include")) + os.cp("include/simsimd/complex.h", package:installdir("include")) + os.cp("include/simsimd/types.h", package:installdir("include")) + end) + + on_test(function (package) + assert(package:has_cfuncs("simsimd_capabilities", {includes = "simsimd.h"})) + end)