diff options
author | Ben Morrison <ben@gbmor.dev> | 2020-05-28 02:58:57 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2020-05-28 02:58:57 -0400 |
commit | bb327d381e5626d96942a805e6a5f4d4a5a771d5 (patch) | |
tree | c7e86c2a6ea8dc67be2221e8517806f365aac088 /Cargo.toml | |
parent | e4af0011c04e2861e4f890bcb7383f9c87e35126 (diff) | |
download | clinte-bb327d381e5626d96942a805e6a5f4d4a5a771d5.tar.gz |
extensive rewrite to use json for storage:
sqlite3 requires the directory where the database resides to be writeable by the user. This presents a problem on multiuser UNIX systems where they may want to limit areas where users have write access. This rewrite totally scraps the sqlite3 database in favor of a pretty simple json file consisting of an array of posts. flock(2) locking is used to synchronize access to the file and make sure two clients aren't trying to write to it at once. The locking is fairly granular right now, but later I may change it to using a single lock for the duration of execution since race conditions are *possible*, if unlikely for the purposes of clinte's intended use.
Diffstat (limited to 'Cargo.toml')
-rw-r--r-- | Cargo.toml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml index 5ee7d98..89b966a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,11 @@ maintenance = { status = "stable" } [dependencies] chrono = "^0.4" +fd-lock = "^1.1" lazy_static = "^1.4" log = "^0.4" -rusqlite = "^0.20" +serde = { version = "^1.0", features = ["derive"] } +serde_json = "^1.0" simplelog = "^0.7" users = "^0.9" |