Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ jobs:
exit 1
}
- name: Test C++
run: build_artifacts/stringzilla_test_cpp20
run: |
build_artifacts/stringzilla_test_cpp20
build_artifacts/stringzilla_test_avoid_stl_cpp20
- name: Check stringzilla_bare is built correctly
run: test -z "$(ldd build_artifacts/libstringzilla_bare.so | grep '.so')"
- name: Build shared library for Go binding
Expand Down Expand Up @@ -264,7 +266,9 @@ jobs:
exit 1
}
- name: Test C++
run: build_artifacts/stringzilla_test_cpp20
run: |
build_artifacts/stringzilla_test_cpp20
build_artifacts/stringzilla_test_avoid_stl_cpp20
- name: Check stringzilla_bare is built correctly
run: test -z "$(ldd build_artifacts/libstringzilla_bare.so | grep '.so')"
- name: Build shared library for Go binding
Expand Down Expand Up @@ -386,7 +390,9 @@ jobs:
exit 1
}
- name: Test C++
run: build_artifacts/stringzilla_test_cpp20
run: |
build_artifacts/stringzilla_test_cpp20
build_artifacts/stringzilla_test_avoid_stl_cpp20
- name: Check stringzilla_bare is built correctly
run: test -z "$(ldd build_artifacts/libstringzilla_bare.so | grep '.so')"

Expand Down Expand Up @@ -482,7 +488,9 @@ jobs:
exit 1
}
- name: Test C++
run: build_artifacts/stringzilla_test_cpp20
run: |
build_artifacts/stringzilla_test_cpp20
build_artifacts/stringzilla_test_avoid_stl_cpp20
- name: Check stringzilla_bare is built correctly
run: test -z "$(ldd build_artifacts/libstringzilla_bare.so | grep '.so')"

Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license: Apache-2.0
version: 5.1.2
repository-code: https://github.com/ashvardanian/StringZilla
url: https://ashvardanian.com/posts/stringzilla/
doi: 10.5281/zenodo.21472333
doi: 10.5281/zenodo.21472332
abstract: >-
Portable string-processing library accelerated with SWAR, SIMD, and GPGPU.
It covers exact and fuzzy search, non-cryptographic hashing and SHA-256 checksums,
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,11 @@ if (STRINGZILLA_BUILD_TEST)
define_launcher(stringzilla_test_cpp17 17 "${STRINGZILLA_TARGET_ARCH}" ${STRINGZILLA_TEST_SOURCES})
define_launcher(stringzilla_test_cpp20 20 "${STRINGZILLA_TARGET_ARCH}" ${STRINGZILLA_TEST_SOURCES})

# The STL-free build has its own translation unit: the suites above exercise the `std::string` interop that
# `SZ_AVOID_STL=1` removes, so they cannot double as its coverage. C++11 pins the floor, C++20 the ceiling.
define_launcher(stringzilla_test_avoid_stl_cpp11 11 "${STRINGZILLA_TARGET_ARCH}" test/avoid_stl.cpp)
define_launcher(stringzilla_test_avoid_stl_cpp20 20 "${STRINGZILLA_TARGET_ARCH}" test/avoid_stl.cpp)

# Test parallel algorithms separately; link the static archive when the libraries are built. StringZillas requires
# C++20 as the minimum language standard for concepts, designated initializers, and templated lambdas. We also test
# C++23 to validate forward compatibility, but only where the toolchain actually advertises support for it — older
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ If StringZilla helps your research or product, please cite it:
@software{Vardanian_StringZilla,
author = {Vardanian, Ash},
title = {{StringZilla: Fast SIMD, SWAR, and GPGPU String Processing}},
doi = {10.5281/zenodo.21472333},
doi = {10.5281/zenodo.21472332},
url = {https://github.com/ashvardanian/StringZilla},
license = {Apache-2.0}
}
Expand Down
1 change: 1 addition & 0 deletions c/stringzillas/stringzillas.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <cstring> // For `std::memcpy`

#include <memory> // For `std::unique_ptr`
#include <variant> // For `std::variant`
#include <string_view> // For `std::string_view`

Expand Down
6 changes: 5 additions & 1 deletion include/stringzilla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,11 @@ __`SZ_AVOID_LIBC`__ and __`SZ_OVERRIDE_LIBC`__:
__`SZ_AVOID_STL`__ and __`SZ_SAFETY_OVER_COMPATIBILITY`__:

> When using the C++ interface one can disable implicit conversions from `std::string` to `sz::string` and back.
> If not needed, the `<string>` and `<string_view>` headers will be excluded, reducing compilation time.
> Setting `SZ_AVOID_STL=1` drops STL __interop__, not functionality.
> The conversions to `std::string` and `std::string_view` disappear, along with the `iterator_category` typedefs that let our iterators satisfy `std::iterator_traits` and the `std::hash` specializations; `sz::string` then defaults to an allocator that refuses every request, so bring your own.
> Every algorithm and every bounds check stays, including `substr`, `at`, `compare`, `insert`, and `replace`.
> Failures that would throw `std::out_of_range`, `std::length_error`, or `std::bad_alloc` instead trip `sz_assert_`, which aborts in debug builds and — like the rest of the library's unchecked surface — continues in release builds.
> The `<iterator>`, `<memory>`, `<string>`, and `<vector>` headers are excluded, which is most of the preprocessing cost: `stringzilla/types.hpp` drops from roughly 58K preprocessed lines to 13K.
> Moreover, if STL compatibility is a low priority, one can make the API safer by disabling the overloads, which are subjectively error prone.

__`STRINGZILLA_BUILD_SHARED`, `STRINGZILLA_BUILD_TEST`, `STRINGZILLA_BUILD_BENCHMARK`, `STRINGZILLA_TARGET_ARCH`__ for CMake users:
Expand Down
Loading
Loading