luizirber / niffler

Simple and transparent support for compressed files.
Apache License 2.0
75 stars 7 forks source link

wasm feature #21

Open luizirber opened 4 years ago

luizirber commented 4 years ago

In sourmash I'm disabling default features to be able to use niffler in wasm environments. lzma and bzip2 require -sys crates, which are harder to compile properly in wasm32-unknown-unknown (browser) and wasm32-wasi (which does have a libc, but the toolchain still has issues with cross-compiling C code).

Pure rust implementations (like the one flate2 + miniz-oxide provide for gzip) are preferable in this case, because they will have less issues.

Having a wasm feature would be a shorthand for adding the formats that are supported.

Possible crates for adding more formats to wasm: