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.15k stars 73 forks source link

Fix: Swift bindings #71

Closed vmanot closed 8 months ago

ashvardanian commented 9 months ago

Thank you for the contribution, @vmanot! Looks good! Will be waiting for your confirmation to merge 🤗

vmanot commented 8 months ago

@ashvardanian I think the surface API is good for now, might PR some minor tweaks later.

ashvardanian commented 8 months ago

@vmanot, thank you for the PR! Happy to merge, but have a couple of questions:

  1. Don't we need a throw StringZillaError.contiguousStorageUnavailable in extension String: StringZillaViewable, similar to other extensions?
  2. If those exceptions are thrown, how do they propagate to the user? Seems like the "find" functions will just return nil for a missing match. Is there a good way to test/document those behaviors?
vmanot commented 8 months ago

@ashvardanian pushing something for this tomorrow.

ashvardanian commented 8 months ago

Hi @vmanot! Can I please ask you to rebase from the development branch. I've decided to remove the package-lock.json from the history. It was over 7000 lines of JSON polluting the project, and I don't want every DBMS or runtime to end up pulling that noise. Thank you for understanding 🤗

vmanot commented 8 months ago

@ashvardanian yes of course!

ashvardanian commented 8 months ago

Hey @vmanot! There is now a CI job that tests Swift on both Linux and MacOS. Should help us both 🤗

PS: There may be a bug in the binding catched by the testFindLastCharacterNotFromSet, which I've commented out for now.

ashvardanian commented 8 months ago

Hi @vmanot! I've managed to rebase your commits onto the main-dev, so I'm closing this PR. Thanks for the contribution 🤗