Skip to content
Daniel Lemire edited this page Jul 4, 2020 · 1 revision

The simdjson library is on msys2...

https://packages.msys2.org/base/mingw-w64-simdjson

Instructions...

Get MSYS2. Start a MinGW 64-bit console. Type...

pacman -Syu 

pacman -S mingw-w64-x86_64-simdjson

create a file test.cpp with the following content :

#include "simdjson.h"
int main(void) {
  simdjson::dom::parser parser;
  simdjson::dom::element tweets = parser.load("twitter.json");
  std::cout << tweets["search_metadata"]["count"] << " results." << std::endl;
}

Then get the twitter.json file:

wget https://raw.githubusercontent.com/simdjson/simdjson/master/jsonexamples/twitter.json

Compile and run...

g++ -o test test.cpp -lsimdjson

./test twitter.json
Clone this wiki locally