ashvardanian / StringZilla

Up to 10x faster strings for C, C++, Python, Rust, and Swift, leveraging NEON, AVX2, AVX-512, and SWAR to accelerate search, sort, edit distances, alignment scores, etc 🦖
https://ashvardanian.com/posts/stringzilla/
Apache License 2.0
2.1k stars 71 forks source link

Quick-start instructions for C++, Rust, and Swift #125

Open Tafnab opened 6 months ago

Tafnab commented 6 months ago

On Debian 12, cmake v. 3.25.1, builds fine. Passes all tests.

However, the make file appears to be useless so far as installing for C/C++ goes.
Having a small section detailing the purpose of the CMakeLists.txt, and how to install for each supported language would clear things up.

ashvardanian commented 6 months ago

Hi @Tafnab! Which Makefile are you referring to?

You can find build instructions for different environments in CONTRIBUTING.md. But if you need just the library itself, in Rust - you add a Crate dependency, and in Swift- you use the Swift Package Manager, which links directly to GitHub. Feel free to patch the README.md if you think it's worth clarifying those details further 🤗

Tafnab commented 6 months ago

Based on what I've seen, the cmake file is only used to build the benchmarks. For C/C++ installation, just copy the include/stringzilla/* to /usr/include/stringzilla. I'm not sure where ./c/lib.c should go on the system. Shouldn't is also go to /usr/include/stringzilla? Since a number of people just want to try out your project, I expect this would be appreciated.

So far as I can tell, when using c/lib.c, you don't need to link against a library.

I would expect that instructions for python, swift, and rust would also be appreciated. I can't write them, because I don't use those languages and don't really know what you have in mind for installation.

ashvardanian commented 5 months ago

:tada: This issue has been resolved in version 3.8.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ashvardanian commented 5 months ago

For C and C++ I still have a CMake script to refactor, so reopening 🤗