Skip to content

Commit 7cd0424

Browse files
Changed connections to allow user to provide the stream (#4)
* 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
1 parent 071ee31 commit 7cd0424

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2803
-3178
lines changed

.vscode/settings.json

-9
This file was deleted.

Cargo.lock

+13-72
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+18-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
[package]
22
name = "mqrstt"
3-
version = "0.1.0"
3+
version = "0.1.1"
4+
homepage = "https://github.com/GunnarMorrigan/mqrstt"
5+
repository = "https://github.com/GunnarMorrigan/mqrstt"
6+
categories = ["network-programming"]
7+
readme = "README.md"
48
edition = "2021"
5-
license = "Apache-2.0"
9+
license = "MPL-2.0"
10+
keywords = [ "MQTT", "IoT", "MQTTv5", "messaging", "client" ]
11+
description = "Pure rust MQTTv5 client implementation for Smol, Tokio and soon sync too."
612

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

915
[features]
10-
default = ["smol", "tcp"]
16+
default = ["smol", "tokio"]
1117
tokio = ["dep:tokio"]
1218
smol = ["dep:smol"]
13-
tcp = []
14-
tokio-rustls = ["dep:tokio-rustls", "dep:rustls", "dep:rustls-pemfile", "dep:webpki"]
15-
smol-rustls = ["dep:async-rustls", "dep:rustls", "dep:rustls-pemfile", "dep:webpki"]
16-
17-
# If in the future we only provide an MQTT packet handler to make it async, sync and runtime agnostic
18-
# then this is not needed
1919
# quic = ["dep:quinn"]
20-
# native-tls = ["dep:async-native-tls"]
20+
2121

2222
[dependencies]
2323
# Packets
@@ -27,32 +27,29 @@ bitflags = "1.3.2"
2727
# Errors
2828
thiserror = "1.0.37"
2929
tracing = "0.1.37"
30-
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
3130

3231
async-channel = "1.8.0"
3332
async-mutex = "1.4.0"
34-
futures-concurrency = "7.0.0"
3533
futures = { version = "0.3.25", default-features = false, features = ["std", "async-await"] }
36-
37-
# Needed for all TLS
38-
rustls = { version = "0.20.7", optional = true }
39-
rustls-pemfile = { version = "1.0.1", optional = true }
40-
webpki = { version = "0.22.0", optional = true }
34+
async-trait = "0.1.61"
4135

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

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

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

5445
[dev-dependencies]
5546
pretty_assertions = "1.3.0"
5647
tokio = { version = "1.21", features = ["rt-multi-thread", "rt", "macros", "sync", "io-util", "net", "time"] }
5748
smol = { version = "1.3.0" }
58-
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
49+
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
50+
51+
rustls = { version = "0.20.7" }
52+
rustls-pemfile = { version = "1.0.1" }
53+
webpki = { version = "0.22.0" }
54+
async-rustls = { version = "0.3.0" }
55+
tokio-rustls = "0.23.4"

0 commit comments

Comments
 (0)