about summary refs log tree commit diff
path: root/kittybox-rs/Cargo.toml
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-07-07 00:32:33 +0300
committerVika <vika@fireburn.ru>2022-07-07 00:36:39 +0300
commit7f23ec84bc05c236c1bf40c2f0d72412af711516 (patch)
treef0ba64804fffce29a8f04e5b6c76f9863de81dd2 /kittybox-rs/Cargo.toml
parent5cfac54aa4fb3c207ea2cbbeccd4571fa204a09b (diff)
treewide: rewrite using Axum
Axum has streaming bodies and allows to write simpler code. It also
helps enforce stronger types and looks much more neat.

This allows me to progress on the media endpoint and add streaming
reads and writes to the MediaStore trait.

Metrics are temporarily not implemented. Everything else was
preserved, and the tests still pass, after adjusting for new calling
conventions.

TODO: create method routers for protocol endpoints
Diffstat (limited to 'kittybox-rs/Cargo.toml')
-rw-r--r--kittybox-rs/Cargo.toml51
1 files changed, 28 insertions, 23 deletions
diff --git a/kittybox-rs/Cargo.toml b/kittybox-rs/Cargo.toml
index d43f0f4..99e3097 100644
--- a/kittybox-rs/Cargo.toml
+++ b/kittybox-rs/Cargo.toml
@@ -4,25 +4,27 @@ version = "0.1.0"
 authors = ["Vika <vika@fireburn.ru>"]
 edition = "2021"
 default-run = "kittybox"
+autobins = false
 
 [features]
 default = []
-util = ["anyhow"]
+#util = ["anyhow"]
+#migration = ["util"]
 
 [[bin]]
-name = "kittybox-bulk-import"
-path = "src/bin/kittybox_bulk_import.rs"
-required-features = ["util"]
+name = "kittybox"
+path = "src/main.rs"
+required-features = []
 
-[[bin]]
-name = "pyindieblog-export"
-path = "src/bin/pyindieblog_to_kittybox.rs"
-required-features = ["util", "redis"]
+#[[bin]]
+#name = "kittybox-bulk-import"
+#path = "src/bin/kittybox_bulk_import.rs"
+#required-features = ["migration"]
 
-[[bin]]
-name = "kittybox-database-converter"
-path = "src/bin/kittybox_database_converter.rs"
-required-features = ["util", "redis"]
+#[[bin]]
+#name = "kittybox-database-converter"
+#path = "src/bin/kittybox_database_converter.rs"
+#required-features = ["migration", "redis"]
 
 [workspace]
 members = [".", "./util", "./templates"]
@@ -50,35 +52,42 @@ bytes = "^1.1.0"
 data-encoding = "^2.3.2"     # Efficient and customizable data-encoding functions like base64, base32, and hex
 easy-scraper = "^0.2.0"      # HTML scraping library focused on ease of use
 either = "^1.6.1"            # A general purpose sum type with two cases
-env_logger = "^0.8.3"        # A logging implementation for `log` which is configured via an environment variable
 futures = "^0.3.14"          # An implementation of futures and streams
 futures-util = "^0.3.14"     # Common utilities and extension traits for the futures-rs library
 lazy_static = "^1.4.0"       # A macro for declaring lazily evaluated statics in Rust
 listenfd = "^0.5.0"          # A simple library to work with listenfds passed from the outside (systemd/catflap socket activation)
 log = "^0.4.14"              # A lightweight logging facade for Rust
 markdown = "^0.3.0"          # Native Rust library for parsing Markdown and (outputting HTML)
-markup = "^0.12.0"           # HTML templating engine... ok also very funny about markdown and markup... i just realized the pun...
-mediatype = "^0.19.1"        # MIME Media-type parsing
 newbase60 = "^0.1.3"         # A library that implements Tantek Çelik's New Base 60
 rand = "^0.8.4"              # Random number generators.
-retainer = "^0.2.2"          # Minimal async cache in Rust with support for key expirations
 serde_json = "^1.0.64"       # A JSON serialization file format
 serde_urlencoded = "^0.7.0"  # `x-www-form-urlencoded` meets Serde
 serde_variant = "^0.1.1"     # Retrieve serde provided variant names for enum objects
 relative-path = "^1.5.0"     # Portable relative paths for Rust
 sha2 = "^0.9.8"              # SHA-2 series of algorithms for Rust
-warp-prometheus = "^0.5.0"   # An afterthought of prometheus metrics for Warp
+tracing = { version = "0.1.34", features = [] }
+tracing-tree = "0.2.1"
+tracing-subscriber = { version = "0.3.11", features = ["env-filter", "json"] }
+tower-http = { version = "0.3.3", features = ["trace", "cors"] }
+tower = { version = "0.4.12", features = ["tracing"] }
+tracing-log = "0.1.3"
 [dependencies.tokio]
 version = "^1.16.1"
 features = ["full", "tracing"] # TODO determine if my app doesn't need some features
-[dependencies.console-subscriber]
-version = "0.1.3"
+#[dependencies.console-subscriber]
+#version = "0.1.3"
 [dependencies.tokio-stream]
 version = "^0.1.8"
 features = ["time", "net"]
+[dependencies.tokio-util]
+version = "^0.7.3"
+features = ["io-util"]
 [dependencies.anyhow]
 version = "^1.0.42"
 optional = true
+[dependencies.axum]
+version = "^0.5.11"
+features = ["multipart", "json", "headers"]
 [dependencies.chrono]        # Date and time library for Rust
 version = "^0.4.19"
 features = ["serde"]
@@ -95,10 +104,6 @@ features = ["derive"]
 [dependencies.url]           # URL library for Rust, based on the WHATWG URL Standard
 version = "^2.2.1"
 features = ["serde"]
-[dependencies.warp]
-version = "^0.3.2"
-default-features = false
-features = ["multipart", "compression"]
 [dependencies.http-types]    # Common types for HTTP operations
 version = "^2.11.0"
 features = ["http"]