-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8a940d6
Showing
16 changed files
with
3,388 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target/ | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} |
Oops, something went wrong.