Skip to content

bzip2 has a native Rust implementation #1650

@fanninpm

Description

@fanninpm

Per this:

// NOTE: crates `bzip2`, `xz2` and `zstd` depend on corresponding C libraries and require libc in order to build.
// libc is not present for `wasm32-unknown-unknown` target, so we disable these crates.
// TODO: keep an eye on alternative crates that don't rely on C, and replace when they are stable enough.

I found this on the bzip2 crate's README:

Since version 0.5.0, this crate also supports using libbz2-rs-sys, a drop-in compatible rust implementation of libbz2. With this feature enabled, cross-compilation should work like any other rust code, and no C toolchain is needed to compile this crate or its dependencies.

For example:

bzip2 = { version = "0.5.1", default-features = false, features = ["libbz2-rs-sys"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededt:featType: request of a new feature, functionality, enchancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions