Skip to content

Commit

Permalink
add connected types
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed Aug 13, 2024
1 parent 49e659a commit 0160201
Show file tree
Hide file tree
Showing 8 changed files with 1,212 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# UNRELEASED
- Add `SocketError` trait
- Add `BadParameter` type in `HostNewError`
- Add `BadParameter` type in `HostNewError::BadParameter`
- Add `Host::now` to get the current time according to ENet
- Add `connected` feature, providing an easier integration with connection based protocols
- Allow `ReadWrite` in `#![no_std]` environments
- Change `Host::set_mtu` and `Peer::set_mtu` to take `&mut self` instead of `&self`

Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exclude = [
[features]
default = ["std"]
std = []
connected = []

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.69"
Expand All @@ -24,6 +25,10 @@ js-sys = "0.3.69"
rand = "0.8.5"
rand_chacha = "0.3.1"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
resolver = "2"
members = [
Expand Down
4 changes: 2 additions & 2 deletions ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ fn main() -> anyhow::Result<()> {

let sh = Shell::new()?;
if what_to_run.contains(Check::CHECK) {
check(&sh, Target::Default, Features(&["std"]))?;
check(&sh, Target::Default, Features(&["std", "connected"]))?;
}
if what_to_run.contains(Check::WASM_CHECK) {
check(&sh, Target::Wasm, Features(&["std"]))?;
check(&sh, Target::Wasm, Features(&["std", "connected"]))?;
}
if what_to_run.contains(Check::EXAMPLE_CHECK) {
example_check(&sh)?;
Expand Down
Loading

0 comments on commit 0160201

Please sign in to comment.