Skip to content

chore(deps): update rust crate zstd to v0.14.5 - #635

Open
renovate[bot] wants to merge 1 commit into
trunkfrom
renovate/zstd-0.x-lockfile
Open

renovate[bot] wants to merge 1 commit into
trunkfrom
renovate/zstd-0.x-lockfile

Conversation

@renovate

@renovate renovate Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
zstd dependencies patch 0.14.4 → 0.14.5

Release Notes

gyscos/zstd-rs (zstd)

v0.14.5: zstd 0.14.5

Compare Source

zstd 0.14.5, zstd-safe 8.4.0, zstd-sys 2.2.0

This release bundles zstd 1.6.0, which fixes
CVE-2026-124851 and a
batch of memory-safety bugs (upstream release notes).
Updating is recommended. It also fixes three soundness issues in zstd-safe
(#​401, #​415, #​416).

With pkg-config, the system's zstd library is used instead of the bundled
one: update it to 1.6.0 to get the upstream fixes.

Rust 1.64 remains supported.

zstd-sys 2.2.0+zstd.1.6.0

  • Bundle zstd 1.6.0 (#​420, thanks @​emschwartz). It also fixes the wasm build
    with zstd 1.6.0.
  • zstd 1.6.0 made these part of its stable API, so they no longer need the
    experimental feature: ZSTD_getFrameHeader, ZSTD_FrameHeader,
    ZSTD_FrameType_e, ZSTD_createDDict_byReference,
    ZSTD_CCtx_loadDictionary_advanced, ZSTD_DCtx_loadDictionary_advanced,
    ZSTD_dictContentType_e and ZSTD_dictLoadMethod_e.
  • experimental: zstd 1.6.0 removed ZSTD_copyCCtx and ZSTD_copyDCtx, and
    added ZSTD_isDeterministicBuild.
  • zstd 1.6.0 disables legacy format support by default, but the legacy
    feature keeps working as before (on by default).

zstd-safe 8.4.0

New API:

  • get_frame_header() returns a frame's header (FrameHeader, zstd's own
    struct), or how much of the frame it needs (FrameHeaderStatus).
    get_frame_header_advanced() takes a FrameFormat (experimental).
  • CCtx::load_dictionary_advanced() and DCtx::load_dictionary_advanced()
    take a DictContentType. ref_dictionary() borrows the dictionary instead
    of copying it.
  • DDict::create_by_reference() no longer needs experimental.
  • Worker threads with owned data: CCtx::set_cdict(), CCtx::set_prefix(),
    CCtx::compress_with_cdict(), CCtx::compress_with_prefix(),
    CDict::create_by_reference_owned() (experimental), and
    CCtx::frame_workers(), which tells how many workers a frame gets.

Fixes:

  • Leaking a CCtx in the middle of a multithreaded frame that reads a
    borrowed dictionary or prefix no longer lets the workers read it after the
    borrow ends (#​401, #​411).
  • The block API no longer reads memory that an earlier one-shot call only
    borrowed, or state zstd never set up (#​415, #​417).
  • NoOp no longer writes through a stale pointer when a WriteBuf's
    capacity changes between calls (#​416, #​417).
  • Worker tracking stays in step with zstd: in compress2() when the
    destination panics, with stale pledged sizes, and with clamped
    NbWorkers (#​407).
  • One-shot calls end their session before the WriteBuf runs, so a
    panicking destination no longer leaves the context pointing at borrowed
    buffers (#​409).

Behaviour changes:

  • With worker threads, a streaming frame that reads borrowed data (a prefix
    from ref_prefix(), a CDict made by create_by_reference(), a dictionary
    from ref_dictionary()) runs on the calling thread, and JobSize,
    OverlapSizeLog and RSyncable have no effect on it. compress2() and
    the owned variants above keep the workers.
  • NbWorkers is refused (parameter_unsupported) without the zstdmt
    feature, even when the linked zstd library has threads. zstdmt now
    enables alloc.
  • compress_block() / decompress_block() run in block sessions of their
    own: any other &mut self method ends the session, and a failed block
    call poisons the context until a reset.
  • WriteBuf's contract now says its capacity and pointer must not change
    while zstd-safe uses the buffer (they may between uses, as a Vec's
    does). Every implementation in this crate already did; check your own
    unsafe impl WriteBuf.

zstd 0.14.5

  • DecoderDictionary::new() and try_new() no longer need experimental.
  • EncoderDictionary is Clone, and EncoderDictionary::from_cdict() wraps
    any prepared dictionary. Encoders and compressors keep their own handle, so
    with_prepared_dictionary() only needs the dictionary's bytes to outlive
    them.
  • write::Encoder::with_prefix() takes a prefix the encoder owns, and
    bulk::Compressor::compress_with_prefix() borrows one for a single call:
    both keep the worker threads.
  • Out of memory: failing to allocate a compression context now returns an
    OutOfMemory error instead of panicking. The decoders report
    OutOfMemory (they said Other), and so does zstd's own
    memory_allocation error, which no longer carries a zstd::Error. None
    of these errors allocate (#​414, thanks @​gleocadie, and #​418).
  • write::Encoder no longer writes a second, empty frame when flushed while
    a finish is being retried. Behaviour change: write() in that state
    returns the "encoder is finished" error (#​404).
  • AutoFinishEncoder and AutoFlushDecoder no longer abort the process
    when the writer or callback panics while another panic unwinds (#​404).

Upgrading with the experimental feature

zstd-safe up to 8.2 has CCtx::try_clone() and DCtx::try_clone() behind
experimental, and they call the functions zstd 1.6.0 removed: with
experimental, those versions no longer build against zstd-sys 2.2.0.
Update to zstd-safe 8.4.0 (zstd 0.14.5), or stay on the previous zstd-sys
with cargo update -p zstd-sys --precise 2.1.3+zstd.1.5.7.

The same applies to the 0.13 line: zstd 0.13 picks up zstd-sys 2.2.0 (and
zstd 1.6.0) on cargo update, except with experimental.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from mrshmllow as a code owner November 24, 2026 20:43
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c6bacbf-7d18-4c57-99d1-3c5da456f5e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added rust Pull requests that update rust code release PRs against main labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release PRs against main rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants