Skip to content

refactor: migrate mlxcel-core off unmaintained bincode 1.x #8

Closed

Description

@inureyes

Follow-up to #3 (OSS security automation).

Problem

mlxcel-core depends on bincode 1.3.3 directly. The bincode 1.x team has permanently ceased development following a doxxing/harassment incident (see RUSTSEC-2025-0141 and the project announcement). There is no safe upgrade path — bincode 2.x is a different crate with a breaking API and a different maintainer story.

PR #3 worked around the advisory by adding an [advisories.ignore] entry in deny.toml with the justification that:

bincode 1.x permanently unmaintained; migration tracked in a follow-up issue; no runtime vulnerability

This is the follow-up issue. It tracks the actual migration to a maintained alternative.

Candidate alternatives

(Pick the one whose semantics best match mlxcel-core's current bincode usage — encode/decode of Serialize/Deserialize types, likely for cache snapshot / config / small fixed-shape records.)

Crate Pros Cons
postcard Actively maintained, no_std-friendly, compact wire format, serde-based Different on-wire format from bincode (migration cost for any persisted artifacts)
bitcode Actively maintained, very fast, supports both serde and derive Newer, narrower ecosystem
rkyv Zero-copy deserialization, very fast for hot read paths Different programming model (not serde-based); bigger refactor
bincode 2.x Same name, similar mental model Different maintainer / project history; not a drop-in upgrade

Tasks

  • Audit mlxcel-core to find every bincode::serialize / deserialize (and related) call site
  • Determine whether any on-wire format is persisted across processes (file on disk, network) — if yes, a format migration is needed (write old + new, or version-tag the artifacts); if no, in-process swap is safe
  • Pick the alternative (recommend postcard if no zero-copy need; bitcode if performance dominates; rkyv if there's a clear hot read path that benefits)
  • Migrate call sites
  • Once bincode 1.x is no longer in the dependency tree, remove the [advisories.ignore] entry for RUSTSEC-2025-0141 in deny.toml
  • Verify cargo deny check passes cleanly without the ignore

Risks

  • If bincode is used for any on-disk cache (e.g. tokenizer cache, KV-cache snapshot, model metadata), users with the old cache will break on upgrade. Strategy: detect old format on read and re-encode, or invalidate.
  • Performance characteristics differ between the alternatives — benchmark on the actual hot path before committing.

Refs

Activity

  1. added
    type:refactor
    priority:medium
    status:ready
    area:core
    on May 18, 2026
  2. added
    status:in-progress
    status:review
    and removed
    status:ready
    status:in-progress
    on May 18, 2026
  3. added a commit that references this issue on May 18, 2026
    a84284e
  4. added
    status:done
    and removed
    status:review
    on May 18, 2026
  5. added this to the 0.1 milestone on Jun 5, 2026
  6. self-assigned this
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:corepriority:mediumstatus:donetype:refactor

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions