Skip to content

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
Disabled filesystem by default because of the pathetic performance and
dubious durability. Documented this change in the readme.

Also bumped up the version everywhere.
  • Loading branch information
SeriousBug committed Jan 27, 2023
1 parent 86b3e9d commit e462a8f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rust-analyzer.cargo.features": "all"
}
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cuttlestore"
description = "A generic API for interacting with key-value stores that can be selected at runtime."
version = "0.1.0"
version = "0.2.0"
edition = "2021"
authors = ["Kaan Barmore-Genç <kaan@bgenc.net>"]
license = "MIT"
Expand All @@ -11,7 +11,6 @@ repository = "https://github.com/SeriousBug/cuttlestore"
[features]
default = [
"backend-redis",
"backend-filesystem",
"backend-in-memory",
"backend-sqlite",
"logging-tracing",
Expand Down
29 changes: 21 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,32 @@ async fn main() {

Cuttlestore currently has support for:

| Name | Feature | Connection string | Description |
| ---------- | ------------------ | ----------------- | ----------------------------------------------------------------------------------------------- |
| Redis | backend-redis | redis://127.0.0.1 | Backed by Redis. This will get you the best scalability. |
| Sqlite | backend-sqlite | sqlite://path | An sqlite database used as a key-value store. Best performance if scalability is not a concern. |
| Filesystem | backend-filesystem | filesystem://path | Uses files in a folder as a key-value store. Performance depends on your filesystem. |
| In-Memory | backend-in-memory | in-memory | Not persistent, but very high performance. Useful if the store is ephemeral, like a cache. |
| Name | Feature | Connection string | Description | Enabled by default |
| ---------- | ------------------ | ----------------- | ----------------------------------------------------------------------------------------------- | ------------------ |
| Redis | backend-redis | redis://127.0.0.1 | Backed by Redis. This will get you the best scalability. | Yes |
| Sqlite | backend-sqlite | sqlite://path | An sqlite database used as a key-value store. Best performance if scalability is not a concern. | Yes |
| Filesystem | backend-filesystem | filesystem://path | Uses files in a folder as a key-value store. Performance depends on your filesystem. | No |
| In-Memory | backend-in-memory | in-memory | Not persistent, but very high performance. Useful if the store is ephemeral, like a cache. | Yes |

## Installing

Add Cuttlestore to your `Cargo.toml`:

```toml
cuttlestore = "0.1"
cuttlestore = "0.2"
```

If you want to disable or enable some of the backends, disable the default
features and pick the ones you want:

```toml
cuttlestore = { version = "0.2", default-features = false, features = [
# Only leave redis and sqlite enabled
"backend-redis",
"backend-sqlite",
# Remember to enable this or `logging-log`
"logging-tracing",
] }
```

## Overview
Expand Down Expand Up @@ -88,7 +101,7 @@ The library can log errors with both
can switch to `log` by enabling the feature:

```toml
cuttlestore = { version = "0.1", default-features = false, features = [
cuttlestore = { version = "0.2", default-features = false, features = [
"logging-log",
# remember to enable the backends!
"backend-redis",
Expand Down

0 comments on commit e462a8f

Please sign in to comment.