update everything
Some checks are pending
Build Multiarch Container Image / call-reusable-workflow (push) Waiting to run

This commit is contained in:
Sebastian Hugentobler 2025-07-02 08:20:04 +02:00
parent 033a3e2c72
commit 1c95f4391f
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
11 changed files with 1162 additions and 572 deletions

1
.gitignore vendored
View file

@ -1,3 +1,2 @@
target
result
.direnv

1623
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,9 +5,9 @@ members = [
]
[workspace.dependencies]
serde = "1.0.203"
serde = "1.0.219"
thiserror = "1.0.61"
time = { version = "0.3.36", features = ["macros", "serde", "formatting", "parsing" ] }
time = { version = "0.3.41", features = ["macros", "serde", "formatting", "parsing" ] }
[workspace.package]
license = "AGPL-3.0"

View file

@ -1,7 +1,7 @@
[package]
name = "calibre-db"
version = "0.1.0"
edition = "2021"
edition = "2024"
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
@ -9,9 +9,9 @@ description = "Read data from a calibre library, leveraging its SQLite metadata
[dependencies]
r2d2 = "0.8.10"
r2d2_sqlite = "0.24.0"
rusqlite = { version = "0.31.0", features = ["bundled", "time"] }
r2d2_sqlite = "0.30.0"
rusqlite = { version = "0.36.0", features = ["bundled", "time"] }
serde = { workspace = true }
tempfile = "3.10.1"
tempfile = "3.20.0"
thiserror = { workspace = true }
time = { workspace = true }

30
flake.lock generated
View file

@ -6,11 +6,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1714544767,
"narHash": "sha256-kF1bX+YFMedf1g0PAJYwGUkzh22JmULtj8Rm4IXAQKs=",
"lastModified": 1751352216,
"narHash": "sha256-dJj8TUoZGj55Ttro37vvFGF2L+xlYNfspQ9u4BfqTFw=",
"owner": "nix-community",
"repo": "fenix",
"rev": "73124e1356bde9411b163d636b39fe4804b7ca45",
"rev": "61b4f1e21bd631da91981f1ed74c959d6993f554",
"type": "github"
},
"original": {
@ -24,11 +24,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -39,11 +39,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github"
},
"original": {
@ -55,11 +55,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github"
},
"original": {
@ -79,11 +79,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1714501997,
"narHash": "sha256-g31zfxwUFzkPgX0Q8sZLcrqGmOxwjEZ/iqJjNx4fEGo=",
"lastModified": 1751296293,
"narHash": "sha256-oaGMVdCcI32y6jQ7RE0+CqshZngfI19XnY31eYjdinI=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "49e502b277a8126a9ad10c802d1aaa3ef1a280ef",
"rev": "eaf37e2c98b66ff7f7a0ac04e4cada39e51fde4b",
"type": "github"
},
"original": {

View file

@ -1,5 +1,4 @@
{
description = "little-hesinde project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
@ -17,15 +16,21 @@
system:
let
pkgs = import nixpkgs { inherit system; };
rust = fenix.packages.${system}.stable;
fx = fenix.packages.${system};
rust = fx.combine [
(fx.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
})
];
buildInputs = [
rust
pkgs.cargo-deny
];
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
rust.toolchain
pkgs.cargo-deny
pkgs.rust-analyzer
];
buildInputs = buildInputs;
};
}
);

View file

@ -1,7 +1,7 @@
[package]
name = "little-hesinde"
version = "0.3.1"
edition = "2021"
edition = "2024"
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
@ -9,25 +9,25 @@ description = "A very simple ebook server for a calibre library, providing a htm
[dependencies]
calibre-db = { path = "../calibre-db/", version = "0.1.0" }
clap = { version = "4.5.7", features = ["derive", "env"] }
image = { version = "0.25.1", default-features = false, features = ["jpeg", "rayon"] }
once_cell = "1.19.0"
clap = { version = "4.5.40", features = ["derive", "env"] }
image = { version = "0.25.6", default-features = false, features = ["jpeg", "rayon"] }
once_cell = "1.21.3"
poem = { version = "3.0.1", features = ["embed", "static-files"] }
rust-embed = "8.4.0"
sha2 = "0.10.8"
rust-embed = "8.7.2"
sha2 = "0.10.9"
serde = { workspace = true }
serde_json = "1.0.118"
serde_with = "3.8.1"
serde_json = "1.0.140"
serde_with = "3.14.0"
tera = "1.20.0"
thiserror = { workspace = true }
time = { workspace = true }
tokio = { version = "1.38.0", features = ["signal", "rt-multi-thread", "macros"] }
tokio-util = "0.7.11"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
uuid = { version = "1.9.1", features = ["v4", "fast-rng"] }
quick-xml = { version = "0.34.0", features = ["serialize"] }
tokio = { version = "1.45.1", features = ["signal", "rt-multi-thread", "macros"] }
tokio-util = "0.7.15"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
uuid = { version = "1.17.0", features = ["v4", "fast-rng"] }
quick-xml = { version = "0.38.0", features = ["serialize"] }
[build-dependencies]
ignore = "0.4.22"
zip = { version = "2.1.3", default-features = false, features = ["deflate"] }
ignore = "0.4.23"
zip = { version = "4.2.0", default-features = false, features = ["deflate"] }

View file

@ -3,9 +3,6 @@ use little_hesinde::{cli::Cli, config::Config};
#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
if std::env::var_os("RUST_LOG").is_none() {
std::env::set_var("RUST_LOG", "debug");
}
tracing_subscriber::fmt::init();
let args = Cli::parse();

View file

@ -1,6 +1,6 @@
//! Error handling for OPDS data.
use std::string::FromUtf8Error;
use std::{io, string::FromUtf8Error};
use quick_xml::DeError;
use thiserror::Error;
@ -18,4 +18,10 @@ pub enum OpdsError {
/// Error decoding xml as UTF-8.
#[error("failed to decode as utf-8")]
Utf8Error(#[from] FromUtf8Error),
/// Error parsing OPDS xml structure.
#[error("xml serialization failure")]
XmlSerializationError(#[from] quick_xml::SeError),
/// Error parsing OPDS xml structure.
#[error("xml io failure")]
XmlIoError(#[from] io::Error),
}

View file

@ -3,9 +3,9 @@
use std::io::Cursor;
use quick_xml::{
Reader, Writer,
events::{BytesDecl, BytesStart, Event},
se::to_string,
Reader, Writer,
};
use serde::Serialize;
use time::OffsetDateTime;

4
rust-toolchain.toml Normal file
View file

@ -0,0 +1,4 @@
[toolchain]
channel = "1.85.0"
components = ["rust-src", "rustc", "cargo", "rust-std", "rustfmt", "clippy", "rust-analyzer"]
profile = "minimal"