Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
target
Cargo.lock
.vscode
autobahn/client/
autobahn/server/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased (0.28.0)
* Reduce `Error` size 136 -> **32** by boxing internals of `Error::Http`, `Error::WriteBufferFull`,
`ProtocolError::InvalidHeader`, `TlsError::Native`, `TlsError::Rustls`.

# 0.27.0
- Fix large message read performance by enforcing max `read_buffer_size` read chunks.
- Make `Hash` implementation consistent for `Utf8Bytes` payloads.
Expand Down
23 changes: 19 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@ all-features = true

[features]
default = ["handshake"]
handshake = ["data-encoding", "http", "httparse", "sha1"]
handshake = ["data-encoding", "headers", "httparse", "sha1"]
headers = ["http", "dep:headers"]
url = ["dep:url"]
native-tls = ["native-tls-crate"]
native-tls-vendored = ["native-tls", "native-tls-crate/vendored"]
rustls-tls-native-roots = ["__rustls-tls", "rustls-native-certs"]
rustls-tls-webpki-roots = ["__rustls-tls", "webpki-roots"]
__rustls-tls = ["rustls", "rustls-pki-types"]
deflate = ["headers", "flate2"]

[dependencies]
data-encoding = { version = "2", optional = true }
bytes = "1.9.0"
headers = { version = "0.4.0", optional = true }
http = { version = "1.0", optional = true }
httparse = { version = "1.3.4", optional = true }
log = "0.4.8"
Expand All @@ -39,6 +42,16 @@ thiserror = "2.0.7"
url = { version = "2.1.0", optional = true }
utf-8 = "0.7.5"

[dependencies.flate2]
optional = true
version = "1.0.27"
default-features = false
# We need some zlib-compatible backend from flate2 to support setting the
# context window size. Enabling the "zlib" feature is enough, and, per the
# flate2 documentation, if other crates in the build graph enable the "zlib-ng"
# or "zlib-ng-compat" features, those will take precedence.
features = ["zlib"]

[dependencies.native-tls-crate]
optional = true
package = "native-tls"
Expand All @@ -63,6 +76,8 @@ optional = true
version = "0.26"

[dev-dependencies]
http = "1.0"
httparse = "1.3.4"
criterion = "0.6"
env_logger = "0.11"
input_buffer = "0.5.0"
Expand Down Expand Up @@ -99,16 +114,16 @@ required-features = ["handshake"]

[[example]]
name = "autobahn-client"
required-features = ["handshake"]
required-features = ["handshake", "deflate"]

[[example]]
name = "autobahn-server"
required-features = ["handshake"]
required-features = ["handshake", "deflate"]

[[example]]
name = "callback-error"
required-features = ["handshake"]

[[example]]
name = "srv_accept_unmasked_frames"
required-features = ["handshake"]
required-features = ["handshake"]
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ Choose the one that is appropriate for your needs.
By default **no TLS feature is activated**, so make sure you use one of the TLS features,
otherwise you won't be able to communicate with the TLS endpoints.

There is no support for permessage-deflate at the moment, but the PRs are welcome :wink:

Testing
-------

Expand Down
Loading