Repository navigation
std.png: migrate libspng v0.7.4 over std.engines.zlib and support bundle dependencies (#3013) - #3655
Merged
Merged
Conversation
…dle dependencies (#3013)
Contributor
Author
|
Seed-driven battery and
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3013 (implements Eric's 2026-11-25 ruling for the
std.pngengine:randy408/libspngv0.7.4 migrated overstd.engines.zlib, confirming both zlib-backed inflate/deflate and PNG encoding before promotion).Confirmed against pinned
libspngv0.7.4std.engines.zlib(one inflate/deflate instd):spng.ccalls only 9 zlib functions (crc32,inflateInit2_,inflateValidate,inflate,inflateEnd,deflateInit2_,deflateBound,deflate,deflateEnd), all bound directly tostd.engines.zlibviazlib_bridge.withwith zero duplicated zlib code inlibspng.o.libspng-test) andstd.png(behav_3013_std_png.with) with RGBA8 encode -> PNG signature check -> RGBA8 decode pixel-exact round-trips and corrupt-input rejection.Summary
src/compiler/Link.with: fixed-point transitive embedded.wobundle selection inlink_stage_select_embedded_bundlesso a corpus bundle (libspng) that calls another corpus bundle (zlib) links its dependency on demand across all 6 targets.src/compiler/Frontend.with: read foreign corpus bundle interfaces on demand during non-tree corpus bundle builds (keepingrt.wiread-whole) so colliding names displace cleanly.src/compiler/Compilation.with: accept linked/embedded dependency bundle prefixes in--emit-bundle-manifest.lib/std/libc.with,src/CImport.with: addstd.libc.abs(pure With) andstd.libc.INT32_MAX(D90) needed bylibspng's Paeth and filter-selection functions.build/corpus.with,build/wo.with,build/corpora.with,build.with: generalbundle_deps: List[str]onCorpusandWoBundle(wires--link-bundleand deps across host, cross, and wasm32 bundles).build/libspng.with,lib/std/engines/libspng/: 8th corpus, D112 first promotion oflibspng-0.7.4(SPNG_DISABLE_OPT, portable across all 6 targets), withlibspng-testlane.lib/std/png.with: safestd.pngfacade (PngError,Image,decode_rgba,encode_rgba,read_rgba,write_rgba).test/behavior/behav_3013_std_png.with: in-memory and on-disk binary RGBA8 PNG encode/decode round-trip and error-path tests.Next step on #3013
with uatexpect image:+--record-images+ §18.5d spec words (and spiral--capture) follow in the next PR once a seed carrying §29.11 (keywords as struct fields, used by migratedlibspng/defs.with) is pinned.Verification
src/main build :libspng-promote: promoted 5 modules, stamped D112 first promotion, all 6 target bundles greensrc/main build :libspng-test :libspng-wo-drift :libspng-bundle-root-check :libspng-integrity :libc-surface-check: all greenout/release/bin/with test test/behavior/behav_3013_std_png.with: passed:release-checkspending (will post verdicts below before marking ready).