Skip to content

Commit

Permalink
9.4.0 (#309)
Browse files Browse the repository at this point in the history
* feat: specialize-into-bytes ff
* feat: add scan_buffered and scan_cluster_buffered
* feat: auto continue scanning on page drop

---------

Co-authored-by: ArtemIsmagilov <[email protected]>
  • Loading branch information
aembke and ArtemIsmagilov authored Nov 7, 2024
1 parent 4413043 commit 1b7fa4e
Show file tree
Hide file tree
Showing 47 changed files with 769 additions and 312 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 9.4.0

* Change scanning functions to automatically continue when the current page is dropped
* Add `scan_buffered` and `scan_cluster_buffered` interfaces
* Add `specialize-into-bytes` feature flag

## 9.3.0

* Add `SETNX`, `ECHO`, `TYPE`, `EXPIRETIME`, and `PEXPIRETIME` commands
Expand Down
35 changes: 26 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "fred"
readme = "README.md"
repository = "https://github.com/aembke/fred.rs"
rust-version = "1.75"
version = "9.3.0"
version = "9.4.0"

[package.metadata.docs.rs]
# do not show the glommio version of the docs
Expand All @@ -33,7 +33,8 @@ features = [
"enable-rustls",
"enable-native-tls",
"full-tracing",
"credential-provider"
"credential-provider",
"specialize-into-bytes"
]
rustdoc-args = ["--cfg", "docsrs"]

Expand All @@ -45,6 +46,7 @@ test = true
[features]
default = ["transactions", "i-std"]

specialize-into-bytes = []
blocking-encoding = ["tokio/rt-multi-thread"]
custom-reconnect-errors = []
default-nil-types = []
Expand All @@ -64,6 +66,12 @@ credential-provider = []

# Enable experimental support for the Glommio runtime.
glommio = ["dep:glommio", "futures-io", "pin-project", "fred-macros/enabled", "oneshot", "futures-lite"]
# Enable experimental support for the Monoio runtime.
monoio = ["dep:monoio", "monoio-codec", "fred-macros/enabled", "oneshot", "futures-lite", "local-sync"]
monoio-native-tls = ["dep:monoio-native-tls"]
monoio-rustls = ["dep:monoio-rustls"]
# [WIP] Enable experimental support for the Smol runtime.
smol = []

# Enables rustls with the rustls/aws_lc_rs crypto backend
enable-rustls = [
Expand Down Expand Up @@ -177,6 +185,15 @@ semver = "1.0"
serde_json = { version = "1", optional = true }
sha-1 = { version = "0.10", optional = true }
socket2 = "0.5"
tracing = { version = "0.1", optional = true }
tracing-futures = { version = "0.2", optional = true }
url = "2.4"
urlencoding = "2.1"
# DNS Features
trust-dns-resolver = { version = "0.23", optional = true, features = ["tokio"] }
hickory-resolver = { version = "0.24.1", optional = true, features = ["tokio"] }
fred-macros = "0.1"
# Tokio Dependencies
tokio = { version = "1.34", features = [
"net",
"sync",
Expand All @@ -188,18 +205,18 @@ tokio-native-tls = { version = "0.3", optional = true }
tokio-rustls = { version = "0.26", optional = true, default-features = false }
tokio-stream = "0.1"
tokio-util = { version = "0.7", features = ["codec"] }
tracing = { version = "0.1", optional = true }
tracing-futures = { version = "0.2", optional = true }
trust-dns-resolver = { version = "0.23", optional = true, features = ["tokio"] }
hickory-resolver = { version = "0.24.1", optional = true, features = ["tokio"] }
url = "2.4"
urlencoding = "2.1"
fred-macros = "0.1"
# Glommio Dependencies
glommio = { version = "0.9.0", optional = true }
futures-io = { version = "0.3", optional = true }
pin-project = { version = "1.1.5", optional = true }
oneshot = { version = "0.1.8", optional = true, features = ["async"] }
futures-lite = { version = "2.3", optional = true }
# Monoio Dependencies
monoio = { version = "0.2.4", optional = true, features = ["bytes"] }
monoio-codec = { version = "0.3.4", optional = true }
monoio-native-tls = { version = "0.4.0", optional = true }
monoio-rustls = { version = "0.4.0", optional = true }
local-sync = { version = "0.1.1", optional = true }

[dev-dependencies]
axum = { version = "0.7", features = ["macros"] }
Expand Down
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,32 @@ See the build features for more information.

## Client Features

| Name | Default | Description |
|---------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transactions` | x | Enable a [Transaction](https://redis.io/docs/interact/transactions/) interface. |
| `enable-native-tls` | | Enable TLS support via [native-tls](https://crates.io/crates/native-tls). |
| `enable-rustls` | | Enable TLS support via [rustls](https://crates.io/crates/rustls) with the default crypto backend features. |
| `enable-rustls-ring` | | Enable TLS support via [rustls](https://crates.io/crates/rustls) and the ring crypto backend. |
| `vendored-openssl` | | Enable the `native-tls/vendored` feature. |
| `metrics` | | Enable the metrics interface to track overall latency, network latency, and request/response sizes. |
| `full-tracing` | | Enable full [tracing](./src/trace/README.md) support. This can emit a lot of data. |
| `partial-tracing` | | Enable partial [tracing](./src/trace/README.md) support, only emitting traces for top level commands and network latency. |
| `blocking-encoding` | | Use a blocking task for encoding or decoding frames. This can be useful for clients that send or receive large payloads, but requires a multi-thread Tokio runtime. |
| `custom-reconnect-errors` | | Enable an interface for callers to customize the types of errors that should automatically trigger reconnection logic. |
| `monitor` | | Enable an interface for running the `MONITOR` command. |
| `sentinel-client` | | Enable an interface for communicating directly with Sentinel nodes. This is not necessary to use normal Redis clients behind a sentinel layer. |
| `sentinel-auth` | | Enable an interface for using different authentication credentials to sentinel nodes. |
| `subscriber-client` | | Enable a subscriber client interface that manages channel subscription state for callers. |
| `serde-json` | | Enable an interface to automatically convert Redis types to JSON via `serde-json`. |
| `mocks` | | Enable a mocking layer interface that can be used to intercept and process commands in tests. |
| `dns` | | Enable an interface that allows callers to override the DNS lookup logic. |
| `replicas` | | Enable an interface that routes commands to replica nodes. |
| `default-nil-types` | | Enable a looser parsing interface for `nil` values. |
| `sha-1` | | Enable an interface for hashing Lua scripts. |
| `unix-sockets` | | Enable Unix socket support. |
| `glommio` | | Enable experimental [Glommio](https://github.com/DataDog/glommio) support. See the [Glommio Runtime](https://github.com/aembke/fred.rs/blob/main/src/glommio/README.md) docs for more information. When enabled the client will no longer work with Tokio runtimes. |
| `credential-provider` | | Enable an interface that can dynamically load auth credentials at runtime. |
| Name | Default | Description |
|---------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `transactions` | x | Enable a [Transaction](https://redis.io/docs/interact/transactions/) interface. |
| `enable-native-tls` | | Enable TLS support via [native-tls](https://crates.io/crates/native-tls). |
| `enable-rustls` | | Enable TLS support via [rustls](https://crates.io/crates/rustls) with the default crypto backend features. |
| `enable-rustls-ring` | | Enable TLS support via [rustls](https://crates.io/crates/rustls) and the ring crypto backend. |
| `vendored-openssl` | | Enable the `native-tls/vendored` feature. |
| `metrics` | | Enable the metrics interface to track overall latency, network latency, and request/response sizes. |
| `full-tracing` | | Enable full [tracing](./src/trace/README.md) support. This can emit a lot of data. |
| `partial-tracing` | | Enable partial [tracing](./src/trace/README.md) support, only emitting traces for top level commands and network latency. |
| `blocking-encoding` | | Use a blocking task for encoding or decoding frames. This can be useful for clients that send or receive large payloads, but requires a multi-thread Tokio runtime. |
| `custom-reconnect-errors` | | Enable an interface for callers to customize the types of errors that should automatically trigger reconnection logic. |
| `monitor` | | Enable an interface for running the `MONITOR` command. |
| `sentinel-client` | | Enable an interface for communicating directly with Sentinel nodes. This is not necessary to use normal Redis clients behind a sentinel layer. |
| `sentinel-auth` | | Enable an interface for using different authentication credentials to sentinel nodes. |
| `subscriber-client` | | Enable a subscriber client interface that manages channel subscription state for callers. |
| `serde-json` | | Enable an interface to automatically convert Redis types to JSON via `serde-json`. |
| `mocks` | | Enable a mocking layer interface that can be used to intercept and process commands in tests. |
| `dns` | | Enable an interface that allows callers to override the DNS lookup logic. |
| `replicas` | | Enable an interface that routes commands to replica nodes. |
| `default-nil-types` | | Enable a looser parsing interface for `nil` values. |
| `sha-1` | | Enable an interface for hashing Lua scripts. |
| `unix-sockets` | | Enable Unix socket support. |
| `credential-provider` | | Enable an interface that can dynamically load auth credentials at runtime. |
| `specialize-into-bytes` | | Specialize `TryFrom<Vec<u8> for RedisValue>` to use `RedisValue::Bytes`, disabling `From<u8> for RedisValue`. This is a temporary feature flag that will be made the default in the next major version. |
| `glommio` | | Enable experimental [Glommio](https://github.com/DataDog/glommio) support. |

## Interface Features

Expand Down
4 changes: 2 additions & 2 deletions bin/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ tokio = { version = "1", features = ["full"] }
futures = "0.3"
rand = "0.8"
indicatif = "=0.17.1"
bb8-redis = { version = "0.14", optional = true }
bb8-redis = { version = "0.17.0", optional = true }

[dependencies.fred]
#path = "../.."
path = "/fred"
features = ["replicas", "unix-sockets"]
features = ["replicas", "unix-sockets", "i-all"]
default-features = false

[features]
Expand Down
Loading

0 comments on commit 1b7fa4e

Please sign in to comment.