denvera / rqrr_ex

Simple package to allow reading QR codes with Elixir. Uses Rustler and Rust rqrr crate (https://crates.io/crates/rqrr) to provide NIFs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RqrrEx

Hex.pm Version

Simple binding to allow using rqrr from Elixir. Uses Rustler for bindings.

Requirements

Working Rust toolchain.

Installation

Add rqrr_ex to your list of dependencies in mix.exs:

def deps do
  [
    {:rqrr_ex, "~> 0.1.2"}
  ]
end

Examples

Detect and decode QR codes from a file supported by the Rust image crate.

  RqrrEx.detect_qr_codes(File.read!("./test.png"))
  {:ok,
  [
    ok: {%{
        __struct__: Rqrr.Metadata,
        bounds: [{474, 674}, {569, 674}, {569, 770}, {474, 770}],
        ecc_level: 1,
        mask: 2,
        modules: 41
        version: 6
      },
      "The QR Code Content!"}
  ]}

Documentation can be found at https://hexdocs.pm/rqrr_ex.

About

Simple package to allow reading QR codes with Elixir. Uses Rustler and Rust rqrr crate (https://crates.io/crates/rqrr) to provide NIFs.


Languages

Language:Elixir 73.0%Language:Rust 27.0%