From 21e7017ca38332d213e50e4925f34ab9fbef57c5 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 2 Dec 2026 22:52:57 -0500 Subject: [PATCH] Build with simdjson 5.3.0, which renamed write_uint_jeaiii to write_uint simdjson 5.3.0 renamed simdjson::internal::write_uint_jeaiii to write_uint: call the new name, download simdjson 5.3.0, and require 5.3.0 or later. --- .github/workflows/release.yml | 2 +- CMakeLists.txt | 2 +- README.md | 4 ++-- src/to_json.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f65168..df3d82a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ concurrency: cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }} env: - SIMDJSON_VERSION: v5.0.7 + SIMDJSON_VERSION: v5.3.0 jobs: test: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f987e0..575df72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ option(SIMDJSON_MSGPACK_COMPETITION "Benchmark other libraries too" OFF) include(FetchContent) FetchContent_Declare(simdjson - URL https://github.com/simdjson/simdjson/archive/refs/tags/v5.0.7.tar.gz + URL https://github.com/simdjson/simdjson/archive/refs/tags/v5.3.0.tar.gz DOWNLOAD_EXTRACT_TIMESTAMP TRUE) set(SIMDJSON_DEVELOPER_MODE OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(simdjson) diff --git a/README.md b/README.md index fbcdfec..ff061f0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The simplest way: take two files from a [release](https://github.com/simdjson/simdjson_msgpack/releases), `simdjson_msgpack.h` and `simdjson_msgpack.cpp` (or `singleheader.zip`, which holds both), and the two files of a -[simdjson release](https://github.com/simdjson/simdjson/releases) (5.0.7 or +[simdjson release](https://github.com/simdjson/simdjson/releases) (5.3.0 or later), `simdjson.h` and `simdjson.cpp`. Put the four files in one directory, include `simdjson_msgpack.h`, and compile the two source files with yours, as C++17: @@ -285,7 +285,7 @@ cmake --build build ctest --test-dir build # the tests and the example ``` -CMake downloads simdjson 5.0.7. Options: `SIMDJSON_MSGPACK_TESTS`, +CMake downloads simdjson 5.3.0. Options: `SIMDJSON_MSGPACK_TESTS`, `SIMDJSON_MSGPACK_BENCHMARKS` and `SIMDJSON_MSGPACK_EXAMPLES` (on by default), and `SIMDJSON_MSGPACK_COMPETITION` (off), which downloads nlohmann/json, yyjson, RapidJSON and mpack and builds `bench_competition`. diff --git a/src/to_json.cpp b/src/to_json.cpp index 9f8d087..622508d 100644 --- a/src/to_json.cpp +++ b/src/to_json.cpp @@ -216,14 +216,14 @@ class decoder { simdjson_inline bool has(size_t n) const { return size_t(end_ - in_) >= n; } simdjson_inline void put_uint(uint64_t x) { - out_ = simdjson::internal::write_uint_jeaiii(out_, x); + out_ = simdjson::internal::write_uint(out_, x); } simdjson_inline void put_int(int64_t x) { const bool negative = x < 0; *out_ = '-'; out_ += negative; const uint64_t magnitude = negative ? 0 - static_cast(x) : static_cast(x); - out_ = simdjson::internal::write_uint_jeaiii(out_, magnitude); + out_ = simdjson::internal::write_uint(out_, magnitude); } // The shortest representation that gives back x, with a decimal point or // an exponent (1.0, not 1), so that it reads back as a floating-point