From 97988d98f2cf010a3ce1717de677dfbadf77741f Mon Sep 17 00:00:00 2001 From: Justin Donaldson Date: Sun, 8 Mar 2026 17:32:38 -0700 Subject: [PATCH] [lua] Default to vanilla JSON parser, make simdjson opt-in Switch the Lua target's default JSON parser from hx-lua-simdjson (C dependency) to the pure Haxe implementation. simdjson can still be enabled with -D lua_simdjson. This removes a native dependency from the default Lua experience, making `haxe --lua` work without luarocks/simdjson installed. --- std/lua/_std/haxe/format/JsonParser.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/std/lua/_std/haxe/format/JsonParser.hx b/std/lua/_std/haxe/format/JsonParser.hx index d6dbba341eb..318fd0853b8 100644 --- a/std/lua/_std/haxe/format/JsonParser.hx +++ b/std/lua/_std/haxe/format/JsonParser.hx @@ -42,10 +42,10 @@ class JsonParser { If `str` is null, the result is unspecified. **/ static public inline function parse(str:String):Dynamic { - #if lua_vanilla - return new JsonParser(str).doParse(); - #else + #if lua_simdjson return lua.lib.hxluasimdjson.Json.parse(str); + #else + return new JsonParser(str).doParse(); #end }