From e462a8fba95e9146debc67f883c0bc93cb857153 Mon Sep 17 00:00:00 2001 From: Kaan Barmore-Genc Date: Thu, 26 Jan 2023 22:48:23 -0500 Subject: [PATCH] Release 0.2.0 Disabled filesystem by default because of the pathetic performance and dubious durability. Documented this change in the readme. Also bumped up the version everywhere. --- .vscode/settings.json | 3 +++ Cargo.toml | 3 +-- Readme.md | 29 +++++++++++++++++++++-------- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f5c4ed --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.cargo.features": "all" +} diff --git a/Cargo.toml b/Cargo.toml index 2552b34..273ed44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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ç "] license = "MIT" @@ -11,7 +11,6 @@ repository = "https://github.com/SeriousBug/cuttlestore" [features] default = [ "backend-redis", - "backend-filesystem", "backend-in-memory", "backend-sqlite", "logging-tracing", diff --git a/Readme.md b/Readme.md index 58496b2..ed70c77 100644 --- a/Readme.md +++ b/Readme.md @@ -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 @@ -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",