My First Rust Crate

141 points Firasuke

Greetings fellow Rustaceans!

So I've been working on a project of mine that deals with lzip tarballs (.lz) (which also uses the LZMA algorithm, similar to xz and 7z), and I was unable to find any crate that deals with such tarballs.

I tried searching for crates that implement the LZMA algorithm hoping that I'd be able to handle ".lz" tarballs correctly, to no avail:

https://github.com/alexcrichton/xz2-rs/issues/89

https://github.com/gendx/lzma-rs/issues/71

So, I decided to create an "lzip-rs" crate which provides bindings to "lzlib", following similar existing projects (e.g. "bzip2-rs" and "xz2-rs"), but I wasn't successful.

The crate isn't published yet, but it's available on GitHub.

All feedback is appreciated!

Thanks for your time!

EDIT: The code inside "src/" belongs entirely to Alex Crichton and I included it initially for reference as he wrote a couple of bindings crates around several compression libraries.

EDIT 2: I'm using the following as references:

\- https://doc.rust-lang.org/cargo/reference/build-scripts.html

\- https://github.com/rust-lang/libz-sys

\- https://kornel.ski/rust-sys-crate

\- https://doc.rust-lang.org/cargo/reference/publishing.html

\- https://github.com/alexcrichton/bzip2-rs

\- https://github.com/alexcrichton/xz2-rs