Skip to content

Commit

Permalink
fix cross-platform conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Apr 23, 2022
1 parent aba3df4 commit 7921737
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 5 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ name = "realm"
path = "src/bin.rs"

[dependencies]
# realm
realm_io = { path = "realm_io" }
kaminari = { version = "0.6.0", optional = true }

# common
cfg-if = "1"
futures = "0.3"
log = "0.4"
Expand All @@ -34,10 +39,6 @@ trust-dns-resolver = { version = "0.20", optional = true }
pin-project = "1"
lazy_static = "1"

# transport
kaminari = { version = "0.6.0", optional = true }


# tfo
tokio-tfo = { git = "https://github.com/zephyrchien/tokio-tfo", branch = "main", version = "0.1.9", optional = true }

Expand All @@ -58,9 +59,6 @@ jemallocator = {version = "0.3", optional = true }
[target.'cfg(unix)'.dependencies]
daemonize = "0.4"

# realm
realm_io = { path = "realm_io" }

[profile.release]
opt-level = 3
lto = true
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pub mod conf;
pub mod utils;
pub mod relay;

pub const VERSION: &str = "2.1.1";
pub const VERSION: &str = "2.1.2";
pub const ENV_CONFIG: &str = "REALM_CONF";
6 changes: 5 additions & 1 deletion src/relay/tcp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,9 @@ async fn relay_plain(
}

#[cfg(not(all(target_os = "linux", feature = "zero-copy")))]
realm_io::bidi_copy(&mut inbound, &mut outbound).await
{
let (res, _, _) =
realm_io::bidi_copy(&mut inbound, &mut outbound).await;
res
}
}

0 comments on commit 7921737

Please sign in to comment.