Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async-tungstenite: Make TLS features optional #222

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 131 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ tar = { version = "0.4.33", optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
libc = "0.2.101"
async-std = { version = "1.12.0", features = ["attributes", "unstable"] }
async-tungstenite = { version = "0.25", features = [
"async-std-runtime",
"async-tls",
] }
async-tungstenite = { version = "0.25", features = ["async-std-runtime"] }
async-io = "2.2.0"

# Transit
Expand Down Expand Up @@ -103,6 +100,11 @@ forwarding = ["transit", "rmp-serde"]
default = ["transit", "transfer"]
all = ["default", "forwarding"]

# TLS implementations for websocket connections via async-tungstenite
# required for optional wss connection to the mailbox server
tls = ["async-tungstenite/async-tls"]
native-tls = ["async-tungstenite/async-native-tls"]

[profile.release]
overflow-checks = true
strip = "debuginfo"
Expand Down
6 changes: 4 additions & 2 deletions src/core/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ pub async fn test_file_rust2rust_deprecated() -> eyre::Result<()> {
.name("sender".to_owned())
.spawn(async {
let (welcome, wormhole_future) =
Wormhole::connect_without_code(transfer::APP_CONFIG.id(TEST_APPID).clone(), 2).await?;
Wormhole::connect_without_code(transfer::APP_CONFIG.id(TEST_APPID).clone(), 2)
.await?;
if let Some(welcome) = &welcome.welcome {
log::info!("Got welcome: {}", welcome);
}
Expand Down Expand Up @@ -258,7 +259,8 @@ pub async fn test_file_rust2rust() -> eyre::Result<()> {
.name("sender".to_owned())
.spawn(async {
let mailbox_connection =
MailboxConnection::create(transfer::APP_CONFIG.id(TEST_APPID).clone(), 2).await?;
MailboxConnection::create(transfer::APP_CONFIG.id(TEST_APPID).clone(), 2)
.await?;
if let Some(welcome) = &mailbox_connection.welcome {
log::info!("Got welcome: {}", welcome);
}
Expand Down
Loading