Repository navigation
feat(version): list compiled-in Cargo features in --version output - #4522
Merged
Merged
Conversation
oferchen
force-pushed
the
feat/version-build-features
branch
2 times, most recently
from
May 18, 2026 20:19
499c5b0 to
16eb2d9
Compare
Adds a "Build features:" section to the human-readable --version banner, listing every Cargo feature visible at the core crate's compile time: zstd, lz4, zlib-ng, acl, xattr, iconv, async, embedded-ssh, mmap-free-basis. Each entry mirrors the canonical feature name from Cargo.toml so users can tell at a glance what the binary was compiled with without having to grep `Cargo.toml` or inspect linker output. Bin-only features that do not propagate into core (parallel, io_uring, iocp, copy_file_range, openssl, sd-notify, mimalloc) continue to surface via the existing Capabilities, Optimizations, and Platform I/O sections. Followups can teach the renderer to consume per-crate feature manifests so the list becomes exhaustive without hardcoded cfg!() calls here.
core's Cargo.toml does not declare the mmap-free-basis feature (it lives at the bin level and forwards into engine + fast_io), so referencing cfg(feature = "mmap-free-basis") from core's renderer triggers unexpected_cfgs and fails the build. The Build features section continues to enumerate every core-visible feature; bin-only features remain documented in the function's rustdoc and surface via the existing Capabilities/Optimizations sections.
oferchen
force-pushed
the
feat/version-build-features
branch
from
May 19, 2026 10:46
2f84218 to
a8acbc8
Compare
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
oferchen
added a commit
that referenced
this pull request
Jun 17, 2026
… (#5871) Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…4522) * feat(version): list compiled-in Cargo features in --version output Adds a "Build features:" section to the human-readable --version banner, listing every Cargo feature visible at the core crate's compile time: zstd, lz4, zlib-ng, acl, xattr, iconv, async, embedded-ssh, mmap-free-basis. Each entry mirrors the canonical feature name from Cargo.toml so users can tell at a glance what the binary was compiled with without having to grep `Cargo.toml` or inspect linker output. Bin-only features that do not propagate into core (parallel, io_uring, iocp, copy_file_range, openssl, sd-notify, mimalloc) continue to surface via the existing Capabilities, Optimizations, and Platform I/O sections. Followups can teach the renderer to consume per-crate feature manifests so the list becomes exhaustive without hardcoded cfg!() calls here. * fix(version): drop bin-only mmap-free-basis feature check from core core's Cargo.toml does not declare the mmap-free-basis feature (it lives at the bin level and forwards into engine + fast_io), so referencing cfg(feature = "mmap-free-basis") from core's renderer triggers unexpected_cfgs and fails the build. The Build features section continues to enumerate every core-visible feature; bin-only features remain documented in the function's rustdoc and surface via the existing Capabilities/Optimizations sections.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… (#5871) Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
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
compiled_build_features()enumerating every core-visible Cargo feature the binary was built with (zstd, lz4, zlib-ng, acl, xattr, iconv, async, embedded-ssh).--versionrenderer as a newBuild features:section under the existingPlatform I/O:line.Capabilities/Optimizationssections.Test plan
oc-rsync --versionshowsBuild features: zstd lz4 ...line on a default buildnone) for a no-default-features build