Skip to content

Commit

Permalink
Introduce an inprocess feature
Browse files Browse the repository at this point in the history
This is used to enable the fake IPC implementation using inprocess channels.
The feature has to be manually enabled on platforms that aren't supported
by the crate, i.e. Windows and Android.
  • Loading branch information
nox committed Jun 29, 2016
1 parent b3386e3 commit a1b6926
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ version = "0.2.4"
name = "ipc_channel"
path = "lib.rs"

[features]
inprocess = []

[dependencies]
bincode = ">=0.4.1, <0.6"
lazy_static = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ install:
build: false

test_script:
- cargo test --verbose
- cargo test --verbose --features inprocess
2 changes: 1 addition & 1 deletion lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(feature = "inprocess", feature(mpsc_select))]
#![feature(borrow_state)]
#![cfg_attr(any(target_os="windows", target_os="android"), feature(mpsc_select))]

#[macro_use]
extern crate lazy_static;
Expand Down
6 changes: 3 additions & 3 deletions platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
// except according to those terms.

mod os {
#[cfg(target_os = "linux")]
#[cfg(all(not(feature = "inprocess"), target_os = "linux"))]
include!("linux/mod.rs");

#[cfg(target_os = "macos")]
#[cfg(all(not(feature = "inprocess"), target_os = "macos"))]
include!("macos/mod.rs");

#[cfg(any(target_os = "windows", target_os = "android"))]
#[cfg(feature = "inprocess")]
include!("inprocess/mod.rs");
}

Expand Down

0 comments on commit a1b6926

Please sign in to comment.