aboutsummaryrefslogtreecommitdiff
path: root/libffwd
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-25 14:00:54 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-25 14:01:11 +0200
commit13dd2132310fb4dc5aa3dd217ed62f2e8301b981 (patch)
tree0e6f5dfdc686365af06fb59d32957e47a3ca5a79 /libffwd
parentb673eb9a72138b89f1efecf52578020cb43857ff (diff)
downloadffwd-13dd2132310fb4dc5aa3dd217ed62f2e8301b981.tar.gz
ffwd-13dd2132310fb4dc5aa3dd217ed62f2e8301b981.zip
all: migrate to yyjson
Diffstat (limited to 'libffwd')
-rw-r--r--libffwd/Makefile5
-rw-r--r--libffwd/bpe.c2
-rw-r--r--libffwd/config.c2
3 files changed, 3 insertions, 6 deletions
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 <yyjson.h>
#include <limits.h>
#include <stdint.h>
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 <yyjson.h>
#include <errno.h>
#include <limits.h>