Skip to content

Rename xz crate to xz-core#7

Merged
youknowone merged 1 commit intomainfrom
xz-core
Apr 20, 2026
Merged

Rename xz crate to xz-core#7
youknowone merged 1 commit intomainfrom
xz-core

Conversation

@youknowone
Copy link
Copy Markdown
Owner

@youknowone youknowone commented Apr 20, 2026

Summary by CodeRabbit

  • Refactor
    • Renamed the Rust XZ backend from "xz" to "xz-core" across the project (features, crate/package identity, build wiring, examples, and runtime identifiers).
  • Documentation
    • Updated docs and usage examples to reference "xz-core" in commands and profiling/inspection guidance.
  • Tests
    • Adjusted tests and benchmarks to expect "xz-core" labels.
  • Chores
    • Updated build/benchmark scripts and lockfile entries to use "xz-core".

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Walkthrough

Renamed the workspace crate xz to xz-core across manifests, feature flags, conditional compilation, imports, re-exports, scripts, examples, benchmarks, tests, and generated lock data; function signatures and runtime control flow were not changed.

Changes

Cohort / File(s) Summary
Workspace & Top-level Cargo
Cargo.toml, Cargo.lock.msrv
Replaced workspace member and optional dependency xzxz-core; updated feature wiring and lock entries (including some unrelated package bumps).
Per-crate Manifests
perf-probe/Cargo.toml, xz-core/Cargo.toml, xz-sys/Cargo.toml
Renamed features/dependency mappings from xzxz-core; changed xz package name to xz-core in the renamed crate manifest.
Library Source
src/lib.rs, src/stream.rs
Switched feature gates from xzxz-core; changed internal sys selection and re-export paths to xz_core::....
Compatibility Layer
xz-sys/src/lib.rs, systest/build.rs
Updated public re-exports, constants, and all wrapper implementations to reference xz_core::...; build script --extern mapping now uses xz_core.
Benchmarks & Examples
benches/backend_comparison.rs, examples/bufread_trailing_probe.rs, examples/qc_probe.rs, examples/standard_files_probe.rs
Adjusted feature-gated BACKEND_NAME, conditional imports, and compile-time guards to use xz-core instead of xz.
Perf & Helper Crates
perf-probe/src/main.rs
Feature validation, conditional imports, CLI feature examples, and backend-identifying constants updated to xz-core.
Scripts & CI Helpers
scripts/compare_all_trimmed.sh, scripts/compare_api_workloads.sh, scripts/compare_backends.sh, scripts/compare_workloads.sh, scripts/inspect_codegen.sh, scripts/profile_backend.sh
Changed cargo feature flags, --command-name labels, help text, and usage examples to reference xz-core.
Docs & Tests
docs/performance-workflow.md, tests/sys_equivalence.rs
Documentation examples and profiling/inspection commands updated to xz-core; tests' substring/assertion messages updated to expect xz_core:: symbol text.
Small Misc
systest/..., other small + cfg-linted edits
Minor relocations of #[cfg(feature = "xz-core")] attributes and related small text changes across build/test utilities.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through manifests, imports, and scripts,
Swapped xz for xz-core in tidy little flips,
From crates to tests, each reference I store,
A whisper of carrots—now names match once more! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Rename xz crate to xz-core' directly and clearly describes the main change throughout the entire changeset, which consistently renames the xz crate to xz-core across all files and configurations.
Docstring Coverage ✅ Passed Docstring coverage is 98.37% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch xz-core

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/inspect_codegen.sh (1)

9-9: ⚠️ Potential issue | 🟡 Minor

Update the documented default package.

Line 33 now defaults to xz-core, but Line 9 still says the default is xz.

📝 Proposed fix
-  --package <name>     Cargo package to inspect (default: xz)
+  --package <name>     Cargo package to inspect (default: xz-core)

Also applies to: 33-33

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/inspect_codegen.sh` at line 9, The help text for the --package option
in scripts/inspect_codegen.sh is out of sync: update the documented default
package string from "xz" to "xz-core" so it matches the actual default used on
line 33; edit the option description that currently reads "--package <name>    
Cargo package to inspect (default: xz)" to instead state "(default: xz-core)"
(locate the help string for the --package flag in the script).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/inspect_codegen.sh`:
- Line 9: The help text for the --package option in scripts/inspect_codegen.sh
is out of sync: update the documented default package string from "xz" to
"xz-core" so it matches the actual default used on line 33; edit the option
description that currently reads "--package <name>     Cargo package to inspect
(default: xz)" to instead state "(default: xz-core)" (locate the help string for
the --package flag in the script).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8f83282e-246f-497e-8057-c6f37f7b499b

📥 Commits

Reviewing files that changed from the base of the PR and between 877fbe1 and 45ce222.

📒 Files selected for processing (114)
  • Cargo.toml
  • benches/backend_comparison.rs
  • docs/performance-workflow.md
  • examples/bufread_trailing_probe.rs
  • examples/qc_probe.rs
  • examples/standard_files_probe.rs
  • perf-probe/Cargo.toml
  • perf-probe/src/main.rs
  • scripts/compare_all_trimmed.sh
  • scripts/compare_api_workloads.sh
  • scripts/compare_backends.sh
  • scripts/compare_workloads.sh
  • scripts/inspect_codegen.sh
  • scripts/profile_backend.sh
  • src/lib.rs
  • src/stream.rs
  • systest/build.rs
  • tests/sys_equivalence.rs
  • xz-core/Cargo.toml
  • xz-core/src/alloc.rs
  • xz-core/src/check/check.rs
  • xz-core/src/check/crc32_fast.rs
  • xz-core/src/check/crc64_fast.rs
  • xz-core/src/check/mod.rs
  • xz-core/src/check/sha256.rs
  • xz-core/src/common/alone_decoder.rs
  • xz-core/src/common/alone_encoder.rs
  • xz-core/src/common/auto_decoder.rs
  • xz-core/src/common/block_buffer_decoder.rs
  • xz-core/src/common/block_buffer_encoder.rs
  • xz-core/src/common/block_decoder.rs
  • xz-core/src/common/block_encoder.rs
  • xz-core/src/common/block_header_decoder.rs
  • xz-core/src/common/block_header_encoder.rs
  • xz-core/src/common/block_util.rs
  • xz-core/src/common/common.rs
  • xz-core/src/common/common_types.rs
  • xz-core/src/common/easy_buffer_encoder.rs
  • xz-core/src/common/easy_decoder_memusage.rs
  • xz-core/src/common/easy_encoder.rs
  • xz-core/src/common/easy_encoder_memusage.rs
  • xz-core/src/common/easy_preset.rs
  • xz-core/src/common/file_info.rs
  • xz-core/src/common/filter_buffer_decoder.rs
  • xz-core/src/common/filter_buffer_encoder.rs
  • xz-core/src/common/filter_common.rs
  • xz-core/src/common/filter_decoder.rs
  • xz-core/src/common/filter_encoder.rs
  • xz-core/src/common/filter_flags_decoder.rs
  • xz-core/src/common/filter_flags_encoder.rs
  • xz-core/src/common/hardware_cputhreads.rs
  • xz-core/src/common/hardware_physmem.rs
  • xz-core/src/common/index.rs
  • xz-core/src/common/index_decoder.rs
  • xz-core/src/common/index_encoder.rs
  • xz-core/src/common/index_hash.rs
  • xz-core/src/common/lzip_decoder.rs
  • xz-core/src/common/microlzma_decoder.rs
  • xz-core/src/common/microlzma_encoder.rs
  • xz-core/src/common/mod.rs
  • xz-core/src/common/outqueue.rs
  • xz-core/src/common/stream_buffer_decoder.rs
  • xz-core/src/common/stream_buffer_encoder.rs
  • xz-core/src/common/stream_decoder.rs
  • xz-core/src/common/stream_decoder_mt.rs
  • xz-core/src/common/stream_encoder.rs
  • xz-core/src/common/stream_encoder_mt.rs
  • xz-core/src/common/stream_flags_common.rs
  • xz-core/src/common/stream_flags_decoder.rs
  • xz-core/src/common/stream_flags_encoder.rs
  • xz-core/src/common/stream_mt.rs
  • xz-core/src/common/string_conversion.rs
  • xz-core/src/common/threading.rs
  • xz-core/src/common/vli_decoder.rs
  • xz-core/src/common/vli_encoder.rs
  • xz-core/src/common/vli_size.rs
  • xz-core/src/delta/delta_common.rs
  • xz-core/src/delta/delta_decoder.rs
  • xz-core/src/delta/delta_encoder.rs
  • xz-core/src/delta/mod.rs
  • xz-core/src/lib.rs
  • xz-core/src/lz/lz_decoder.rs
  • xz-core/src/lz/lz_encoder.rs
  • xz-core/src/lz/lz_encoder_mf.rs
  • xz-core/src/lz/mod.rs
  • xz-core/src/lzma/fastpos_table.rs
  • xz-core/src/lzma/lzma2_decoder.rs
  • xz-core/src/lzma/lzma2_encoder.rs
  • xz-core/src/lzma/lzma_decoder.rs
  • xz-core/src/lzma/lzma_encoder.rs
  • xz-core/src/lzma/lzma_encoder_optimum_fast.rs
  • xz-core/src/lzma/lzma_encoder_optimum_normal.rs
  • xz-core/src/lzma/lzma_encoder_presets.rs
  • xz-core/src/lzma/mod.rs
  • xz-core/src/rangecoder/mod.rs
  • xz-core/src/rangecoder/price_table.rs
  • xz-core/src/simple/arm.rs
  • xz-core/src/simple/arm64.rs
  • xz-core/src/simple/armthumb.rs
  • xz-core/src/simple/ia64.rs
  • xz-core/src/simple/mod.rs
  • xz-core/src/simple/powerpc.rs
  • xz-core/src/simple/riscv.rs
  • xz-core/src/simple/simple_coder.rs
  • xz-core/src/simple/simple_decoder.rs
  • xz-core/src/simple/simple_encoder.rs
  • xz-core/src/simple/sparc.rs
  • xz-core/src/simple/x86.rs
  • xz-core/src/tuklib/mod.rs
  • xz-core/src/tuklib/tuklib_cpucores.rs
  • xz-core/src/tuklib/tuklib_physmem.rs
  • xz-core/src/types.rs
  • xz-sys/Cargo.toml
  • xz-sys/src/lib.rs

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/inspect_codegen.sh (1)

9-9: ⚠️ Potential issue | 🟡 Minor

Stale help text: default package is now xz-core.

Line 33 sets PACKAGE="xz-core", but the --help output on line 9 still advertises the default as xz. Update the usage string to match.

📝 Proposed fix
-  --package <name>     Cargo package to inspect (default: xz)
+  --package <name>     Cargo package to inspect (default: xz-core)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/inspect_codegen.sh` at line 9, The help text is stale: update the
usage string that shows "--package <name>     Cargo package to inspect (default:
xz)" to reflect the new default PACKAGE="xz-core". Locate the help/usage output
in scripts/inspect_codegen.sh (the line printing the --package description) and
change the default shown from "xz" to "xz-core"; also scan for any other
occurrences of "default: xz" in the script and update them to "default:
xz-core".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/inspect_codegen.sh`:
- Line 9: The help text is stale: update the usage string that shows "--package
<name>     Cargo package to inspect (default: xz)" to reflect the new default
PACKAGE="xz-core". Locate the help/usage output in scripts/inspect_codegen.sh
(the line printing the --package description) and change the default shown from
"xz" to "xz-core"; also scan for any other occurrences of "default: xz" in the
script and update them to "default: xz-core".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 708d302e-fdcb-49de-8fe1-493027ad4e92

📥 Commits

Reviewing files that changed from the base of the PR and between 45ce222 and 675b914.

📒 Files selected for processing (115)
  • Cargo.lock.msrv
  • Cargo.toml
  • benches/backend_comparison.rs
  • docs/performance-workflow.md
  • examples/bufread_trailing_probe.rs
  • examples/qc_probe.rs
  • examples/standard_files_probe.rs
  • perf-probe/Cargo.toml
  • perf-probe/src/main.rs
  • scripts/compare_all_trimmed.sh
  • scripts/compare_api_workloads.sh
  • scripts/compare_backends.sh
  • scripts/compare_workloads.sh
  • scripts/inspect_codegen.sh
  • scripts/profile_backend.sh
  • src/lib.rs
  • src/stream.rs
  • systest/build.rs
  • tests/sys_equivalence.rs
  • xz-core/Cargo.toml
  • xz-core/src/alloc.rs
  • xz-core/src/check/check.rs
  • xz-core/src/check/crc32_fast.rs
  • xz-core/src/check/crc64_fast.rs
  • xz-core/src/check/mod.rs
  • xz-core/src/check/sha256.rs
  • xz-core/src/common/alone_decoder.rs
  • xz-core/src/common/alone_encoder.rs
  • xz-core/src/common/auto_decoder.rs
  • xz-core/src/common/block_buffer_decoder.rs
  • xz-core/src/common/block_buffer_encoder.rs
  • xz-core/src/common/block_decoder.rs
  • xz-core/src/common/block_encoder.rs
  • xz-core/src/common/block_header_decoder.rs
  • xz-core/src/common/block_header_encoder.rs
  • xz-core/src/common/block_util.rs
  • xz-core/src/common/common.rs
  • xz-core/src/common/common_types.rs
  • xz-core/src/common/easy_buffer_encoder.rs
  • xz-core/src/common/easy_decoder_memusage.rs
  • xz-core/src/common/easy_encoder.rs
  • xz-core/src/common/easy_encoder_memusage.rs
  • xz-core/src/common/easy_preset.rs
  • xz-core/src/common/file_info.rs
  • xz-core/src/common/filter_buffer_decoder.rs
  • xz-core/src/common/filter_buffer_encoder.rs
  • xz-core/src/common/filter_common.rs
  • xz-core/src/common/filter_decoder.rs
  • xz-core/src/common/filter_encoder.rs
  • xz-core/src/common/filter_flags_decoder.rs
  • xz-core/src/common/filter_flags_encoder.rs
  • xz-core/src/common/hardware_cputhreads.rs
  • xz-core/src/common/hardware_physmem.rs
  • xz-core/src/common/index.rs
  • xz-core/src/common/index_decoder.rs
  • xz-core/src/common/index_encoder.rs
  • xz-core/src/common/index_hash.rs
  • xz-core/src/common/lzip_decoder.rs
  • xz-core/src/common/microlzma_decoder.rs
  • xz-core/src/common/microlzma_encoder.rs
  • xz-core/src/common/mod.rs
  • xz-core/src/common/outqueue.rs
  • xz-core/src/common/stream_buffer_decoder.rs
  • xz-core/src/common/stream_buffer_encoder.rs
  • xz-core/src/common/stream_decoder.rs
  • xz-core/src/common/stream_decoder_mt.rs
  • xz-core/src/common/stream_encoder.rs
  • xz-core/src/common/stream_encoder_mt.rs
  • xz-core/src/common/stream_flags_common.rs
  • xz-core/src/common/stream_flags_decoder.rs
  • xz-core/src/common/stream_flags_encoder.rs
  • xz-core/src/common/stream_mt.rs
  • xz-core/src/common/string_conversion.rs
  • xz-core/src/common/threading.rs
  • xz-core/src/common/vli_decoder.rs
  • xz-core/src/common/vli_encoder.rs
  • xz-core/src/common/vli_size.rs
  • xz-core/src/delta/delta_common.rs
  • xz-core/src/delta/delta_decoder.rs
  • xz-core/src/delta/delta_encoder.rs
  • xz-core/src/delta/mod.rs
  • xz-core/src/lib.rs
  • xz-core/src/lz/lz_decoder.rs
  • xz-core/src/lz/lz_encoder.rs
  • xz-core/src/lz/lz_encoder_mf.rs
  • xz-core/src/lz/mod.rs
  • xz-core/src/lzma/fastpos_table.rs
  • xz-core/src/lzma/lzma2_decoder.rs
  • xz-core/src/lzma/lzma2_encoder.rs
  • xz-core/src/lzma/lzma_decoder.rs
  • xz-core/src/lzma/lzma_encoder.rs
  • xz-core/src/lzma/lzma_encoder_optimum_fast.rs
  • xz-core/src/lzma/lzma_encoder_optimum_normal.rs
  • xz-core/src/lzma/lzma_encoder_presets.rs
  • xz-core/src/lzma/mod.rs
  • xz-core/src/rangecoder/mod.rs
  • xz-core/src/rangecoder/price_table.rs
  • xz-core/src/simple/arm.rs
  • xz-core/src/simple/arm64.rs
  • xz-core/src/simple/armthumb.rs
  • xz-core/src/simple/ia64.rs
  • xz-core/src/simple/mod.rs
  • xz-core/src/simple/powerpc.rs
  • xz-core/src/simple/riscv.rs
  • xz-core/src/simple/simple_coder.rs
  • xz-core/src/simple/simple_decoder.rs
  • xz-core/src/simple/simple_encoder.rs
  • xz-core/src/simple/sparc.rs
  • xz-core/src/simple/x86.rs
  • xz-core/src/tuklib/mod.rs
  • xz-core/src/tuklib/tuklib_cpucores.rs
  • xz-core/src/tuklib/tuklib_physmem.rs
  • xz-core/src/types.rs
  • xz-sys/Cargo.toml
  • xz-sys/src/lib.rs

@youknowone youknowone merged commit 90cff2d into main Apr 20, 2026
47 checks passed
This was referenced Apr 22, 2026
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.

1 participant