Skip to content

Commit

Permalink
new rust brotli FFI cargo package
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrh committed Nov 5, 2018
1 parent 905fc5f commit dd212ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lto=true

[dependencies]
"alloc-no-stdlib" = {version="2.0"}
"brotli-decompressor" = {version="> 2.0.2, < 2.1.0"}
"brotli-decompressor" = {version="~2.0"}
"alloc-stdlib" = {version="~0.2", optional=true}
"packed_simd" = {version="0.3", optional=true}
"sha2" = {version="~0.8", optional=true}
Expand Down
6 changes: 3 additions & 3 deletions c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "brotli"
name = "brotli-ffi"
version = "3.0.0"
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>", "The Brotli Authors"]
description = "A brotli compressor and decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. All included code is safe."
description = "A brotli compressor and decompressor that with an interface exactly matching https://github.com/google/brotli. All included code is safe except the thin exported C-compatible functions."
license = "BSD-3-Clause/MIT"
documentation = "https://github.com/dropbox/rust-brotli/blob/master/README.md"
homepage = "https://github.com/dropbox/rust-brotli"
Expand All @@ -20,7 +20,7 @@ lto=true

[dependencies]
"alloc-no-stdlib" = {version="2.0"}
"brotli-decompressor" = {version="> 2.0.2, < 2.1.0"}
"brotli-decompressor" = {version="~2.0"}
"alloc-stdlib" = {version="~0.2", optional=true}
"packed_simd" = {version="0.3", optional=true}
"sha2" = {version="~0.8", optional=true}
Expand Down
20 changes: 10 additions & 10 deletions c/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
multiexample: multiexample_d decompressor multiexample.c vec_u8.h arg.h custom_alloc.h fuzz fuzz_d
gcc -O3 -o multiexample -g multiexample.c -I. target/release/libbrotli.[ds][lyo]*
gcc -O3 -o multiexample -g multiexample.c -I. target/release/libbrotli_ffi.[ds][lyo]*
multiexample_d: decompressor multiexample.c vec_u8.h arg.h custom_alloc.h
gcc -o multiexample_d -g multiexample.c -I. target/debug/libbrotli.[ds][lyo]*
gcc -o multiexample_d -g multiexample.c -I. target/debug/libbrotli_ffi.[ds][lyo]*
decompressor: decompressor_d decompressor.c target/release/libbrotli.so catbrotli
gcc -O3 -o decompressor -g decompressor.c -I. target/release/libbrotli.[ds][lyo]*
gcc -O3 -o decompressor -g decompressor.c -I. target/release/libbrotli_ffi.[ds][lyo]*
decompressor_d: decompressor.c target/debug/libbrotli.so brotli_tool catbrotli_d
cargo build && gcc -o decompressor_d -g decompressor.c -I. target/debug/libbrotli.[ds][lyo]*
cargo build && gcc -o decompressor_d -g decompressor.c -I. target/debug/libbrotli_ffi.[ds][lyo]*
fuzz: fuzz_d fuzz.c target/release/libbrotli.so catbrotli
gcc -O3 -o fuzz -g fuzz.c -I. target/release/libbrotli.[ds][lyo]*
gcc -O3 -o fuzz -g fuzz.c -I. target/release/libbrotli_ffi.[ds][lyo]*
fuzz_d: fuzz.c target/debug/libbrotli.so brotli_tool catbrotli_d
cargo build && gcc -o fuzz_d -g fuzz.c -I. target/debug/libbrotli.[ds][lyo]*
cargo build && gcc -o fuzz_d -g fuzz.c -I. target/debug/libbrotli_ffi.[ds][lyo]*

brotli_tool: brotli_tool_d decompressor.c target/release/libbrotli.so
gcc -O3 -o brotli_tool -g brotli.c -I. target/release/libbrotli.[ds][lyo]*
gcc -O3 -o brotli_tool -g brotli.c -I. target/release/libbrotli_ffi.[ds][lyo]*
brotli_tool_d: decompressor.c target/debug/libbrotli.so
cargo build && gcc -o brotli_tool_d -g brotli.c -I. target/debug/libbrotli.[ds][lyo]*
cargo build && gcc -o brotli_tool_d -g brotli.c -I. target/debug/libbrotli_ffi.[ds][lyo]*


catbrotli: catbrotli_d decompressor.c catbrotli.c target/release/libbrotli.so
gcc -O3 -o catbrotli -g catbrotli.c -I. target/release/libbrotli.[ds][lyo]*
gcc -O3 -o catbrotli -g catbrotli.c -I. target/release/libbrotli_ffi.[ds][lyo]*
catbrotli_d: catbrotli.c decompressor.c target/debug/libbrotli.so
cargo build && gcc -o catbrotli_d -g catbrotli.c -I. target/debug/libbrotli.[ds][lyo]*
cargo build && gcc -o catbrotli_d -g catbrotli.c -I. target/debug/libbrotli_ffi.[ds][lyo]*



Expand Down

0 comments on commit dd212ea

Please sign in to comment.