Skip to content

Replace YAJL with yyjson for JSON parsing and generation#170

Open
giuseppe wants to merge 5 commits intocontainers:mainfrom
giuseppe:use-yyjson
Open

Replace YAJL with yyjson for JSON parsing and generation#170
giuseppe wants to merge 5 commits intocontainers:mainfrom
giuseppe:use-yyjson

Conversation

@giuseppe
Copy link
Copy Markdown
Member

No description provided.

giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 15, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 16, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe marked this pull request as ready for review April 16, 2026 10:27
@giuseppe giuseppe changed the title [WIP] Replace YAJL with yyjson for JSON parsing and generation Replace YAJL with yyjson for JSON parsing and generation Apr 16, 2026
@giuseppe giuseppe mentioned this pull request Apr 17, 2026
@giuseppe giuseppe linked an issue Apr 17, 2026 that may be closed by this pull request
@xw19
Copy link
Copy Markdown

xw19 commented Apr 18, 2026

@giuseppe will we keep yyjson statically linked?

@giuseppe
Copy link
Copy Markdown
Member Author

we need to support both ways, statically and dynamically linked

giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 23, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 23, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 24, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 24, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/crun that referenced this pull request Apr 24, 2026
Switch from the unmaintained YAJL library to yyjson for all JSON
operations.  Update the build system (configure.ac, Makefile.am) to
use yyjson, and update the libocispec submodule to the version with
yyjson support.

gitmodules is pointing to my git repo for now.

Needs: containers/libocispec#170

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe
Copy link
Copy Markdown
Member Author

@jnovy what do you think of this change?

giuseppe and others added 5 commits April 29, 2026 19:11
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Remove the honggfuzz HF_ITER code path that caused undefined reference
errors when building with -DFUZZER. Wrap main() in #ifndef FUZZER so
LibFuzzer can provide its own entry point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Migrate the entire JSON backend from YAJL to yyjson. This is a big-bang
replacement with no side-by-side support.

Closes: containers#138

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Test parsing and round-trip generation of int64 and uint64 fields
with boundary values: INT64_MAX, INT64_MIN, UINT64_MAX, values
exceeding 32-bit range, negative values, and zero.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Expand the fuzzer from a single-mode runtime config parser to 7 modes
covering all OCI spec parsers with round-trip testing (parse, generate,
re-parse). Add honggfuzz-based CI fuzzing with Docker, matching the
pattern used by crun.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace yajl

2 participants