Skip to content

moving the builder files in their own directory#2578

Merged
lemire merged 1 commit intomasterfrom
builder_reorg
Jan 7, 2026
Merged

moving the builder files in their own directory#2578
lemire merged 1 commit intomasterfrom
builder_reorg

Conversation

@lemire
Copy link
Member

@lemire lemire commented Jan 4, 2026

We had the rather unpleasant design where the builder API was mixed up with the ondemand files. This PR splits them up, for more clarity.

Once this is merged, we'll be able to move the SIMD accelerated part (the string escaping) in the various kernel directories which will also be significantly cleaner and scalable.

@lemire lemire merged commit 8b69401 into master Jan 7, 2026
156 checks passed
@lemire lemire deleted the builder_reorg branch January 7, 2026 23:08
@georgthegreat
Copy link
Contributor

georgthegreat commented Feb 20, 2026

I think this PR broke capability to directtly #include <simdjson/ondemand.h>

Here is the compiler error I receive:

/home/thegeorg/arcadia/contrib/libs/simdjson/include/simdjson/generic/ondemand/amalgamated.h:2:2: error: simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h!
    2 | #error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h!

@lemire is this error related? I am updating from 4.2.4 to 4.3.0

@lemire
Copy link
Member Author

lemire commented Feb 20, 2026

@georgthegreat Our public header is simdjson.h. You can just use this header...

#include <iostream>
#include "simdjson.h"
using namespace simdjson;
int main(void) {
    ondemand::parser parser;
    padded_string json = padded_string::load("twitter.json");
    ondemand::document tweets = parser.iterate(json);
    std::cout << uint64_t(tweets["search_metadata"]["count"]) << " results." << std::endl;
}

I am surprised that #include <simdjson/ondemand.h> ever worked. This was not documented or tested.

@georgthegreat
Copy link
Contributor

Ok, I will fix our code.
We used these includes to speed up compilation.

@lemire
Copy link
Member Author

lemire commented Feb 24, 2026

@georgthegreat We could add such a feature (selective compilation) but I would prefer to do it with feature macros (i.e., we only use X and Y and not Z).

@georgthegreat
Copy link
Contributor

georgthegreat commented Feb 24, 2026

It would be nice to have an issue flagged for tracking purposes.
Thanks in advance!

@lemire
Copy link
Member Author

lemire commented Feb 25, 2026

@georgthegreat See #2615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants