Skip to content

Commit 664a37a

Browse files
committed
Split package to pcsc, pcsc-sys
1 parent a291a25 commit 664a37a

11 files changed

+38
-20
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ matrix:
1414
allow_failures:
1515
- rust: nightly
1616

17+
script:
18+
- cd pcsc-sys && cargo build --verbose
19+
- cd ../pcsc && cargo build --verbose
20+
- cd ../pcsc && cargo test --verbose
21+
1722
cache: cargo
1823

1924
addons:

Cargo.toml

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,2 @@
1-
[package]
2-
name = "pcsc"
3-
description = "Bindings to PC/SC for smart card communication"
4-
version = "0.1.0-alpha3"
5-
license = "MIT"
6-
keywords = ["pcsc", "smartcard"]
7-
categories = ["hardware-support", "external-ffi-bindings", "api-bindings"]
8-
documentation = "https://docs.rs/pcsc"
9-
repository = "https://github.com/bluetech/pcsc-rust"
10-
homepage = "https://github.com/bluetech/pcsc-rust"
11-
readme = "README.md"
12-
authors = ["Ran Benita <[email protected]>"]
13-
14-
[dependencies]
15-
bitflags = "0.7"
1+
[workspace]
2+
members = ["pcsc", "pcsc-sys"]

appveyor.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ install:
1616
build: false
1717

1818
test_script:
19-
- cargo build --verbose
20-
- cargo test --verbose
19+
- cd pcsc-sys && cargo build --verbose
20+
- cd ../pcsc && cargo build --verbose
21+
- cd ../pcsc && cargo test --verbose

pcsc-sys/Cargo.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "pcsc-sys"
3+
description = "Low-level bindings to PC/SC for smart card communication"
4+
version = "0.1.0-alpha3"
5+
license = "MIT"
6+
keywords = ["pcsc", "smartcard"]
7+
categories = ["hardware-support", "external-ffi-bindings"]
8+
documentation = "https://docs.rs/pcsc-sys"
9+
repository = "https://github.com/bluetech/pcsc-rust"
10+
homepage = "https://github.com/bluetech/pcsc-rust"
11+
authors = ["Ran Benita <[email protected]>"]

src/ffi.rs pcsc-sys/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// TODO: Should probably use a build-script to detect the libraries.
2-
// TODO: Should probably move to a separate pcsc-sys crate, as per
3-
// http://doc.crates.io/build-script.html#-sys-packages
42

53
#![allow(dead_code)]
64
#![allow(bad_style)]

pcsc/Cargo.toml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "pcsc"
3+
description = "Bindings to PC/SC for smart card communication"
4+
version = "0.1.0-alpha3"
5+
license = "MIT"
6+
keywords = ["pcsc", "smartcard"]
7+
categories = ["hardware-support", "api-bindings"]
8+
documentation = "https://docs.rs/pcsc"
9+
repository = "https://github.com/bluetech/pcsc-rust"
10+
homepage = "https://github.com/bluetech/pcsc-rust"
11+
readme = "../README.md"
12+
authors = ["Ran Benita <[email protected]>"]
13+
14+
[dependencies]
15+
bitflags = "0.7"
16+
pcsc-sys = { version = "0.1.0-alpha3", path = "../pcsc-sys" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/lib.rs pcsc/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
9494
#[macro_use]
9595
extern crate bitflags;
96+
extern crate pcsc_sys as ffi;
9697

9798
use std::os::raw::c_char;
9899
use std::ffi::{CStr, CString};
@@ -101,7 +102,6 @@ use std::ptr::{null, null_mut};
101102
use std::marker::PhantomData;
102103
use std::ops::Deref;
103104

104-
mod ffi;
105105
use ffi::{DWORD, LONG};
106106

107107
// Note on potentially problematic casts (clippy lints `cast-sign-loss`,

0 commit comments

Comments
 (0)