Skip to content

Commit

Permalink
Changed connections to allow user to provide the stream (#4)
Browse files Browse the repository at this point in the history
* Added keep alive to tokio network

* Removed nested packets mod

* Remove nightly toolchain and async_fn_in_trait feature

* Removed more code dependent on async_fn_in_trait

* Adjusted smol stream to return pingresp and disconnect indicators too.

* Removed atomic_disconnect and added return info

Removed atomic disconnect from event handler and added enum to return status of the event handler.

* Removed commented section

* Added return info and keep alive

* Added async_trait for handler

* Removed stages, they don't work atm

* Adjusted license to MPL

* Removed warn from tokio_network

* Fixed tokio example test in lib

* Always perform reset in the needed cases

* Adjust lib tests

* fmt and clippy

* Adjusted trait bounds

* Adjusted doc example

* Fix lib test cases

* rustfmt

* Remove vscode dir

* Add license file

* Added codecov badge and adjusted version

* Fix license cargo deny
  • Loading branch information
GunnarMorrigan authored Jan 10, 2023
1 parent 071ee31 commit 7cd0424
Show file tree
Hide file tree
Showing 50 changed files with 2,803 additions and 3,178 deletions.
9 changes: 0 additions & 9 deletions .vscode/settings.json

This file was deleted.

85 changes: 13 additions & 72 deletions Cargo.lock

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

39 changes: 18 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[package]
name = "mqrstt"
version = "0.1.0"
version = "0.1.1"
homepage = "https://github.com/GunnarMorrigan/mqrstt"
repository = "https://github.com/GunnarMorrigan/mqrstt"
categories = ["network-programming"]
readme = "README.md"
edition = "2021"
license = "Apache-2.0"
license = "MPL-2.0"
keywords = [ "MQTT", "IoT", "MQTTv5", "messaging", "client" ]
description = "Pure rust MQTTv5 client implementation for Smol, Tokio and soon sync too."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["smol", "tcp"]
default = ["smol", "tokio"]
tokio = ["dep:tokio"]
smol = ["dep:smol"]
tcp = []
tokio-rustls = ["dep:tokio-rustls", "dep:rustls", "dep:rustls-pemfile", "dep:webpki"]
smol-rustls = ["dep:async-rustls", "dep:rustls", "dep:rustls-pemfile", "dep:webpki"]

# If in the future we only provide an MQTT packet handler to make it async, sync and runtime agnostic
# then this is not needed
# quic = ["dep:quinn"]
# native-tls = ["dep:async-native-tls"]


[dependencies]
# Packets
Expand All @@ -27,32 +27,29 @@ bitflags = "1.3.2"
# Errors
thiserror = "1.0.37"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }

async-channel = "1.8.0"
async-mutex = "1.4.0"
futures-concurrency = "7.0.0"
futures = { version = "0.3.25", default-features = false, features = ["std", "async-await"] }

# Needed for all TLS
rustls = { version = "0.20.7", optional = true }
rustls-pemfile = { version = "1.0.1", optional = true }
webpki = { version = "0.22.0", optional = true }
async-trait = "0.1.61"

# quic feature flag
# quinn = {version = "0.9.0", optional = true }

# tokio feature flag
tokio = { version = "1.21", features = ["macros", "io-util", "net", "time"], optional = true }
tokio-rustls = { version = "0.23.4", optional = true }

# smol feature flag
smol = { version = "1.3.0", optional = true }
async-rustls = { version = "0.3.0", optional = true }
#async-native-tls = { version = "0.4.0", optional = true }

[dev-dependencies]
pretty_assertions = "1.3.0"
tokio = { version = "1.21", features = ["rt-multi-thread", "rt", "macros", "sync", "io-util", "net", "time"] }
smol = { version = "1.3.0" }
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }

rustls = { version = "0.20.7" }
rustls-pemfile = { version = "1.0.1" }
webpki = { version = "0.22.0" }
async-rustls = { version = "0.3.0" }
tokio-rustls = "0.23.4"
Loading

0 comments on commit 7cd0424

Please sign in to comment.