Skip to content

Conversation

trueb2
Copy link

@trueb2 trueb2 commented Jan 7, 2022

Switch to using a recent version of awc on an actix_rt

Realistically, I plan on using this with an actix deployment, there is no reason to use hyper or reqwest.

One of the focuses of #24 was compile time, a cargo clean && cargo build --release --example simple_sender took

   Compiling awc v3.0.0-beta.18
   Compiling fcm v0.9.1 (/Users/jwtrueb/Desktop/workspace/fcm-rust)
    Finished release [optimized] target(s) in 38.60s

and a cargo clean && cargo build --release --example simple_sender --features openssl

   Compiling awc v3.0.0-beta.18
   Compiling fcm v0.9.1 (/Users/jwtrueb/Desktop/workspace/fcm-rust)
    Finished release [optimized] target(s) in 41.38s

Here are the some of the features available on awc

[package.metadata.docs.rs]
# features that docs.rs will build with
features = ["openssl", "rustls", "compress-brotli", "compress-gzip", "compress-zstd", "cookies"]

[features]
default = ["compress-brotli", "compress-gzip", "compress-zstd", "cookies"]

# openssl
openssl = ["tls-openssl", "actix-tls/openssl"]

# rustls
rustls = ["tls-rustls", "actix-tls/rustls"]

I set the default feature rustls, since we need SSL


This change is Reviewable

@trueb2
Copy link
Author

trueb2 commented Jan 7, 2022

You might want to break out the features and choose reqwest, hyper, awc, and tls based on features instead of using this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant