Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Dec 3, 2017
0 parents commit 8a940d6
Show file tree
Hide file tree
Showing 16 changed files with 3,388 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target/
Cargo.lock
18 changes: 18 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "quirc"
version = "0.0.1"

authors = ["Will <will@glozer.net>"]
description = "QR code decoder"
license = "ISC"
repository = "https://github.com/wg/quirc-rs"
readme = "README.md"

[dependencies]

[build-dependencies]
cc = "1.0.3"

[dev-dependencies]
image = "0.17.0"
qrcode = "0.5.0"
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2017 Will Glozer

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Rust QR code decoder

quirc-rs provides a Rust interface to Daniel Beer's excellent
[quirc](https://github.com/dlbeer/quirc) QR code decoder.

quirc's C code is bundled with quirc-rs and so a C compiler
is required in addition to the Rust toolchain.
13 changes: 13 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extern crate cc;

use std::env;
use std::path::Path;
use cc::Build;

fn main() {
let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let src = Path::new(&dir).join("c");
let fs = &["decode.c", "identify.c", "quirc.c", "version_db.c"];
let fs = fs.iter().map(|f| src.join(f));
Build::new().include(&src).files(fs).compile("quirc");
}
Loading

0 comments on commit 8a940d6

Please sign in to comment.