Skip to content

disable the RGB API by default#121

Open
dloebl wants to merge 1 commit into
mainfrom
disable-rgb-api-by-default
Open

disable the RGB API by default#121
dloebl wants to merge 1 commit into
mainfrom
disable-rgb-api-by-default

Conversation

@dloebl

@dloebl dloebl commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Disable the RGB API by default, as it's not yet ready for production/experimental. This unblocks making releases directly from main again.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the experimental RGB API opt-in (disabled by default) by moving its public declarations out of cgif.h into a dedicated cgif_rgb.h header and guarding compilation/installation via a Meson option, while keeping internal RGB tests/fuzzing building against an RGB-enabled internal library.

Changes:

  • Introduce -Dexperimental_rgb Meson option to control whether RGB code (src/cgif_rgb.c) and header (inc/cgif_rgb.h) are built/installed with the public library.
  • Move RGB API declarations (types, flags, prototypes) out of inc/cgif.h into new inc/cgif_rgb.h, and update callers to include it explicitly.
  • Adjust tests/fuzz build wiring so RGB tests/fuzzers continue to build against an internal RGB-enabled library even when the public RGB API is disabled.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/rgb_single_color.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_noise.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_noise_animated.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_no_dithering.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_interlaced.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_all_colors.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_256digit.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_256colors.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/rgb_255colors.c Includes cgif_rgb.h explicitly for RGB API usage.
tests/meson.build Splits indexed vs RGB tests so RGB tests link against the internal RGB-enabled dependency.
tests/ealloc_rgb.c Includes cgif_rgb.h explicitly for RGB API usage in malloc-failure test.
src/cgif_rgb.c Includes cgif_rgb.h for RGB API declarations after moving them out of cgif.h.
README.md Documents RGB API as experimental, in separate header, and disabled by default unless opted in.
meson.build Makes RGB sources/headers conditional on experimental_rgb; adds internal RGB-enabled test library dep.
meson_options.txt Adds experimental_rgb boolean option (default false).
inc/cgif.h Removes RGB API declarations to keep the stable public header RGB-free by default.
inc/cgif_rgb.h Adds new experimental RGB public header containing moved declarations.
fuzz/meson.build Links RGB standalone fuzzer against internal RGB-enabled dependency to keep building when RGB is disabled publicly.
fuzz/cgif_rgb_fuzzer.c Includes cgif_rgb.h explicitly for RGB API types/prototypes.
fuzz/cgif_rgb_create_fuzz_seed.c Includes cgif_rgb.h explicitly for RGB API types/prototypes.
examples/cgif_rgb_example.c Includes cgif_rgb.h explicitly for RGB API usage.
examples/cgif_rgb_example_video.c Includes cgif_rgb.h explicitly for RGB API usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 6 to 8
#include <cgif.h>
#include <cgif_rgb.h>

Comment on lines 6 to 8
#include <cgif.h>
#include <cgif_rgb.h>

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.

2 participants