aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-24 14:00:04 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-24 14:00:04 +0200
commita65a9c78e90079d0126a14cf961ce24ead660858 (patch)
treedd5aa8d2d7dbcc25b1b417b10b4c7811d1b8714b
parent967e8b5902842dd403b5998fcd5d929313f14c4f (diff)
downloadffwd-a65a9c78e90079d0126a14cf961ce24ead660858.tar.gz
ffwd-a65a9c78e90079d0126a14cf961ce24ead660858.zip
build: vendor yyjson 0.12.0 as the core JSON library
-rw-r--r--build.mk3
-rw-r--r--libffwd/Makefile3
2 files changed, 6 insertions, 0 deletions
diff --git a/build.mk b/build.mk
index bda0e8c..109f2fb 100644
--- a/build.mk
+++ b/build.mk
@@ -154,6 +154,9 @@ else
CFLAGS = $(OPT)
endif
CPPFLAGS ?=
+# Vendored yyjson (deps/yyjson) is the one JSON parser/writer for the whole
+# tree; every component includes its header from here.
+CPPFLAGS += -I$(ROOT)/deps/yyjson
LDLIBS ?=
SHARED_LDLIBS ?=
diff --git a/libffwd/Makefile b/libffwd/Makefile
index 0c831a6..b9349c3 100644
--- a/libffwd/Makefile
+++ b/libffwd/Makefile
@@ -14,6 +14,9 @@ SHARED_LDFLAGS += $(EXPORT_FLAGS)
# Tokenizer, config, safetensors reader, and L2/cosine helpers: every backend.
COMMON_SRCS := config.c vec.c tokenize.c bpe.c sentencepiece.c wordpiece.c safetensors.c
+# Vendored JSON library, compiled into libffwd so config/tokenizer loading and
+# every consumer (CLI, server) share one parser instead of hand-rolled scanners.
+COMMON_SRCS += ../deps/yyjson/yyjson.c
# CPU math kernels and SIMD dispatch. generic.c is always built; avx.c and
# neon.c each guard their entire body by arch (__AVX2__ / __ARM_NEON), so the