Skip to content

Consider rusty_zstd as an optional pure-Rust zstd backend #480

Description

@Ttimmahlax

The value of integrating

async-compression provides adaptors between compression crates and Rust's modern asynchronous IO types.

You already depend on the C-backed zstd crate; Cargo.toml pins zstd = "^0.13.1".

If you added rusty_zstd as an optional backend, that path drops the C toolchain: no zstd-sys, no FFI, empty crate tree, and #![deny(unsafe_code)] except one audited SIMD island — which matters when the bytes are untrusted. It builds as-is on wasm32 (you already ship wasm32-wasip1-threads) and on no_std + alloc. Streaming stays covered; compressed size is within ~2-4% of C (rusty_zstd README). Your async IO adaptors and other algorithm features stay untouched.

Not asking to replace the existing zstd feature.

How to integrate

Add rusty_zstd from crates.io behind an optional feature. Wire streaming compress/decompress into the same adaptor types the zstd feature uses today. See the rusty_zstd README for the codec API and current version.

Your public async IO surface, tokio/futures features, and tests for the other algorithms stay the same. A feature-flagged trial is enough to judge cost.

Remade With Rust & MATA

We are rebuilding the stack in safe Rust — codecs, parsers, compression, identity, storage — so projects can drop C dependencies without giving up the format. The rest of the org is at https://github.com/Remade-With-Rust if anything else fits the build. Close this issue if rusty_zstd is a poor fit.

  • x.com/farmer_timmm

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions