合并 stash-cli / stash-core 为根目录单 crate(lib + bin),新增 React + Vite + TS 控制台替换 Askama 模板。 build.rs 用 walkdir 把 stash-web/dist 同步到 $OUT_DIR/web,由 include_dir! 编译期内嵌,产出单文件二进制。 路由改为 / 与 /assets/** 走内嵌前端,其余交给 ServeDir,缺失路径返回内置 404。同步更新依赖、.gitignore 与 README。
31 lines
751 B
TOML
31 lines
751 B
TOML
[package]
|
|
name = "stash"
|
|
version = "0.1.0"
|
|
description = ""
|
|
authors = [""]
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
tokio = { version = "1.38", features = ["full"] }
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
thiserror = "2.0.21"
|
|
anyhow = "1.0"
|
|
clap = { version = "4.6.7", features = ["derive"] }
|
|
colored = "3.1.1"
|
|
|
|
# Web 核心与静态托管
|
|
axum = "0.8.9"
|
|
tower-http = { version = "0.7.1", features = ["fs", "cors", "trace"] }
|
|
tower = { version = "0.4", features = ["util"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
mime_guess = "2.0"
|
|
include_dir = "0.7"
|
|
async-stream = "0.3"
|
|
notify = "8"
|
|
|
|
[build-dependencies]
|
|
# build.rs 用它递归复制前端产物到 $OUT_DIR/web
|
|
walkdir = "2.4"
|