feature - complete std.compression RFC (#339, #548)#582
Merged
dannymeijer merged 12 commits intoMay 18, 2026
Conversation
…-rfc-061-std-compression
…-rfc-061-std-compression
…-rfc-061-std-compression
…-rfc-061-std-compression
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.
Summary
This PR completes RFC 061
std.compressionand keeps the implementation dogfooded through source-authored Incan stdlib modules. It now covers one-shot and stream compression/decompression for gzip, zlib, deflate, zstd, bz2, lzma, framed Snappy, raw Snappy interop, explicit autodetection, generated-project compile coverage for issue #548, public reference and how-to docs, release notes, and moves RFC 061 toclosed/implementedfor0.3.0.Type of change
docs/RFCs/*)Area(s)
Select the primary areas touched (used for review routing; labels are managed separately):
Key details
std.compressionnow exposes the RFC baseline codec APIs, includingcompress,decompress,compress_stream,decompress_stream,decompress_auto,decompress_auto_stream, sharedCodec/CompressionErrorvocabulary, framed Snappy defaults, and raw Snappy understd.compression.snappy.raw.BytesIO | Filebranches and shared stdlib helpers, and the generated-project test now builds/runs the nested Cargo output that originally failed in bug - Generated stdlib modules fail Rust build for source-defined sibling imports #548.BytesIO/Filebranches until the compiler can lower a generic reader/writer helper without imposing backend-incompatible bounds. Codec behavior is covered by the fixture, but deeper cross-tool compatibility remains normal stdlib surface risk.Testing / verification
make test/cargo testmake examples(if relevant)incan fmt --check .(if relevant)Manual verification notes:
git fetch origin maingit merge origin/maincargo build --bin incanincan build tests/fixtures/valid/std_compression_surface.incntarget/incan/.cargo-target/release/std_compression_surfacecargo test --test codegen_snapshot_tests test_std_compression_modules_compile_codegen -- --nocapturecargo test --test integration_tests test_std_compression_surface_runs_generated_project -- --nocapturemake docs-buildmake fmtmake pre-commitpassed, including full nextest suite, clippy, cargo-deny, and smoke-test-fast.Docs impact
If docs updated:
workspaces/docs-site/docs/language/how-to/compression.md,workspaces/docs-site/docs/language/reference/stdlib/compression.md,workspaces/docs-site/docs/RFCs/closed/implemented/061_std_compression.md,workspaces/docs-site/docs/release_notes/0_3.mdRFC lifecycle state: RFC 061 is implemented, moved to
workspaces/docs-site/docs/RFCs/closed/implemented/061_std_compression.md, and marked shipped in0.3.0.Checklist
Closes #339
Fixes #548