From 13dd2132310fb4dc5aa3dd217ed62f2e8301b981 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Thu, 25 Jun 2026 14:00:54 +0200 Subject: all: migrate to yyjson --- libffwd/Makefile | 5 +---- libffwd/bpe.c | 2 +- libffwd/config.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'libffwd') diff --git a/libffwd/Makefile b/libffwd/Makefile index b9349c3..70ec9ad 100644 --- a/libffwd/Makefile +++ b/libffwd/Makefile @@ -14,9 +14,6 @@ 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 @@ -47,7 +44,7 @@ DEPS := $(call deps,$(OBJS)) all: $(STATIC) $(SHARED) $(eval $(call static_archive,$(STATIC),$(OBJS))) -$(eval $(call shared_library,$(SHARED),$(OBJS),,$(BACKEND_LDFLAGS) -lm)) +$(eval $(call shared_library,$(SHARED),$(OBJS),,$(BACKEND_LDFLAGS) $(YYJSON_LDFLAGS) -lm)) # The export map is generated from the public ABI (the FFWD_API declarations in # ffwd.h) instead of being committed, so it cannot drift from the header. It is # regenerated when the header or the generator changes, and the shared library diff --git a/libffwd/bpe.c b/libffwd/bpe.c index 9b8b471..b3c8a8c 100644 --- a/libffwd/bpe.c +++ b/libffwd/bpe.c @@ -1,6 +1,6 @@ #include "bpe.h" -#include "yyjson.h" +#include #include #include diff --git a/libffwd/config.c b/libffwd/config.c index ac106bf..6531658 100644 --- a/libffwd/config.c +++ b/libffwd/config.c @@ -1,6 +1,6 @@ #include "config.h" -#include "yyjson.h" +#include #include #include -- cgit v1.3.1