Skip to content

Commit

Permalink
rust: improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel committed Apr 30, 2024
1 parent 441132c commit 03e9c12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wrappers/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn main() -> anyhow::Result<()> {
```

Simple example creating a barcode and writing it to a svg file:

```rust
fn main() -> anyhow::Result<()> {
let svg = zxingcpp::create(zxingcpp::BarcodeFormat::QRCode)
Expand All @@ -52,18 +53,18 @@ fn main() -> anyhow::Result<()> {
```

Note: This should currently be considered a pre-release. The API may change slightly to be even more
"rusty" depending on community feedback.
idiomatic rust depending on community feedback.

## Optional Features

zxing-cpp provides features that are behind [Cargo features](https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section).
They are:

* `bundled` uses a bundled version of the [zxing-cpp](https://github.com/zxing-cpp/zxing-cpp) c++ library.
* [`image`](https://crates.io/crates/image) allows convenient/implicit `ImageView` construction from `GreyImage` and `DynamicImage`.
* [`image`](https://crates.io/crates/image) allows convenient/implicit conversion between `ImageView`/`Image` and`GreyImage`/`DynamicImage`.

## Benchmarking

To compare the performance of this Rust wrapper project with other availble barcode scanner Rust libraries,
To compare the performance of this Rust wrapper project with other available barcode scanner Rust libraries,
I started the project [zxing-bench](https://github.com/axxel/zxing-bench). The README contains a few
results to get an idea.

0 comments on commit 03e9c12

Please sign in to comment.