Skip to content

Commit db8c732

Browse files
squellfolkertdev
authored andcommitted
add section on using; change spelling to US
1 parent bb204f5 commit db8c732

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,25 @@ This repository contains a Rust implementation of the zlib file format that is c
99

1010
This repository contains two public crates:
1111

12-
* `zlib-rs`, a Rust implementation based on [zlib](https://www.zlib.net/manual.html)
13-
with a safe rust API
14-
* `libz-rs-sys`, a zlib-compatible C API for usage in non-Rust
15-
applications
12+
* [zlib-rs](https://crates.io/crates/zlib-rs/), a Rust implementation based on [zlib](https://www.zlib.net/manual.html)
13+
with a safe rust API. This API is under development and still unstable.
14+
* [libz-rs-sys](https://crates.io/crates/libz-rs-sys/), a zlib-compatible C API for usage in non-Rust
15+
applications.
1616

17-
## Acknowledgement
17+
## How to use zlib-rs in your project
18+
19+
zlib-rs can be used in both Rust and C projects.
20+
21+
### Rust projects
22+
23+
By far the easiest way to use zlib-rs is through the [flate2](https://crates.io/crates/flate2) crate, by simply enabling the `zlib-rs` feature gate. This will enable the `zlib-rs`
24+
backend.
25+
26+
## C projects
27+
28+
zlib-rs can be built as a shared object file for usage by C programs that dynamically link to zlib. Please see the example in [libz-rs-sys-cdylib](https://github.com/trifectatechfoundation/zlib-rs/tree/main/libz-rs-sys-cdylib).
29+
30+
## Acknowledgment
1831

1932
This project is heavily based on the [zlib](https://github.com/madler/zlib) and
2033
[zlib-ng](https://github.com/zlib-ng/zlib-ng) projects.

0 commit comments

Comments
 (0)