#snappy #google

sys snappy-sys

Raw bindings to the Google compression library 'snappy'

1 unstable release

Uses old Rust 2015

0.1.0 Aug 31, 2016

#42 in #snappy

Download history 38/week @ 2023-11-02 66/week @ 2023-11-09 41/week @ 2023-11-16 30/week @ 2023-11-23 39/week @ 2023-11-30 22/week @ 2023-12-07 24/week @ 2023-12-14 18/week @ 2023-12-21 12/week @ 2023-12-28 23/week @ 2024-01-04 23/week @ 2024-01-11 20/week @ 2024-01-18 21/week @ 2024-01-25 45/week @ 2024-02-01 18/week @ 2024-02-08 45/week @ 2024-02-15

134 downloads per month
Used in 2 crates (via snappy)

MIT license

1MB
3K SLoC

C++ 2.5K SLoC // 0.2% comments Rust 133 SLoC // 0.0% comments M4 64 SLoC // 0.1% comments Automake 18 SLoC // 0.1% comments Shell 11 SLoC

Snappy

Build Status

[ Originally forked from https://github.com/thestinger/rust-snappy ]

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
snappy = "0.4"

and this to your crate root:

extern crate snappy;

Installing Snappy

  • The Snappy C++ library can be installed on Mac OS X using homebrew brew install snappy.
  • If that library is not installed in the usual path, you can export the LD_LIBRARY_PATH and LD_RUN_PATH environment variables before issueing cargo build.
  • Static linking can be requested by an export SNAPPY_SYS_STATIC=1 prior to cargo build.
  • As a fallback, this crate will try to compile the Snappy C++ library itself and statically link against it. (This behavior can be enforced by an export SNAPPY_SYS_STATIC_FROM_SOURCE=1 prior to cargo build.)

Building

The Snappy C++ library is also optionally bundled as a submodule. A

git submodule update --init

will fetch a copy of the library for local compilation. This can will then be used if the c++ library cannot be found on your system or if SNAPPY_SYS_STATIC_FROM_SOURCE is set to 1.

Dependencies