Initial scaffold: Rust server workspace (sb-api, sb-core, sb-db, sb-auth, sb-shared) + sb-common dependency + systemd

This commit is contained in:
Jan-Peter von Hunnius 2026-08-02 12:48:08 +02:00
commit 7a75a523f0
39 changed files with 183 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[package]
name = "sb-shared"
version = "0.1.0"
edition = "2024"
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"

View file

@ -0,0 +1,15 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AppError {
pub code: String,
pub message: String,
}
impl std::fmt::Display for AppError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}: {}", self.code, self.message)
}
}
impl std::error::Error for AppError {}

View file

@ -0,0 +1,3 @@
pub mod errors;
pub use errors::AppError;