2024-11-12 22:22:48 -06:00
|
|
|
|
[package]
|
|
|
|
|
name = "yumechi-no-kuni-proxy-worker"
|
2024-11-14 23:54:59 -06:00
|
|
|
|
description = "A Misskey proxy worker for ゆめちのくに (Yumechi-no-kuni) instance."
|
|
|
|
|
repository = "https://forge.yumechi.jp/yume/yumechi-no-kuni-proxy-worker"
|
|
|
|
|
license = "Apache-2.0"
|
2024-11-12 22:22:48 -06:00
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
authors = [ "eternal-flame-AD <yume@yumechi.jp>" ]
|
|
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
|
lto = true
|
|
|
|
|
strip = true
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
codegen-units = 1
|
2024-11-13 11:24:08 -06:00
|
|
|
|
panic = "abort"
|
2024-11-12 22:22:48 -06:00
|
|
|
|
|
|
|
|
|
[profile.release-local]
|
|
|
|
|
inherits = "release"
|
|
|
|
|
opt-level = 3
|
|
|
|
|
strip = false
|
2024-11-13 11:24:08 -06:00
|
|
|
|
panic = "unwind"
|
2024-11-12 22:22:48 -06:00
|
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
default = []
|
2024-11-22 13:57:25 -06:00
|
|
|
|
|
|
|
|
|
# Base feature sets based on the environment
|
2024-11-14 23:54:59 -06:00
|
|
|
|
env-local = ["axum/http1", "axum/http2",
|
|
|
|
|
"axum-server",
|
|
|
|
|
"reqwest", "tokio",
|
|
|
|
|
"env_logger",
|
|
|
|
|
"governor",
|
|
|
|
|
"clap", "toml",
|
|
|
|
|
"image/ico",
|
2024-11-15 01:05:02 -06:00
|
|
|
|
"lossy-webp",
|
2024-11-19 02:28:11 -06:00
|
|
|
|
"tower-http",
|
2024-11-20 05:44:08 -06:00
|
|
|
|
"metrics",
|
2024-11-14 23:54:59 -06:00
|
|
|
|
]
|
2024-11-23 15:45:57 -06:00
|
|
|
|
cf-worker = ["dep:worker", "dep:worker-macros", "dep:wasm-bindgen", "image/ico", "panic-console-error"]
|
2024-11-22 13:57:25 -06:00
|
|
|
|
|
|
|
|
|
# Observability and tracing features
|
2024-11-13 11:24:08 -06:00
|
|
|
|
panic-console-error = ["dep:console_error_panic_hook"]
|
2024-11-22 13:57:25 -06:00
|
|
|
|
metrics = ["prometheus"]
|
|
|
|
|
prometheus = ["dep:prometheus"]
|
|
|
|
|
|
|
|
|
|
# Processing capabilities
|
|
|
|
|
lossy-webp = ["dep:webp"]
|
|
|
|
|
|
|
|
|
|
# Server runtime features
|
2024-11-19 02:28:11 -06:00
|
|
|
|
tokio = ["dep:tokio", "axum/tokio", "dep:libc"]
|
|
|
|
|
axum-server = ["dep:axum-server", "tower-http"]
|
2024-11-22 13:57:25 -06:00
|
|
|
|
governor = ["dep:governor"]
|
|
|
|
|
env_logger = ["dep:env_logger"]
|
2024-11-19 02:28:11 -06:00
|
|
|
|
tower-http = ["dep:tower-http"]
|
2024-11-22 13:57:25 -06:00
|
|
|
|
reuse-port = []
|
|
|
|
|
reqwest = ["dep:reqwest", "dep:url"]
|
|
|
|
|
|
|
|
|
|
# Sandbox features
|
|
|
|
|
apparmor = ["dep:siphasher", "dep:libc"]
|
2024-11-12 22:22:48 -06:00
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
worker = { version="0.4.2", features=['http', 'axum'], optional = true }
|
|
|
|
|
worker-macros = { version="0.4.2", features=['http'], optional = true }
|
|
|
|
|
axum = { version = "0.7", default-features = false, features = ["query", "json"] }
|
2024-11-13 11:24:08 -06:00
|
|
|
|
tower-service = "0.3"
|
2024-11-12 22:22:48 -06:00
|
|
|
|
console_error_panic_hook = { version = "0.1.1", optional = true }
|
2024-11-13 11:24:08 -06:00
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
|
futures = { version = "0.3.31", default-features = false, features = ["std"] }
|
2024-11-13 15:12:55 -06:00
|
|
|
|
image = { version = "0.25.5", default-features = false, features = ["avif", "bmp", "gif", "jpeg", "png", "webp"] }
|
2024-11-12 22:22:48 -06:00
|
|
|
|
reqwest = { version = "0.12.9", features = ["brotli", "gzip", "stream", "zstd"], optional = true }
|
2024-11-14 23:54:59 -06:00
|
|
|
|
getrandom = { version = "0.2", features = ["js"] }
|
2024-11-12 22:22:48 -06:00
|
|
|
|
siphasher = { version = "1.0.1", optional = true }
|
2024-11-14 23:54:59 -06:00
|
|
|
|
tokio = { version = "1.41.1", features = ["rt", "rt-multi-thread", "macros", "sync", "signal"], optional = true }
|
2024-11-12 22:22:48 -06:00
|
|
|
|
clap = { version = "4.5.20", features = ["derive"], optional = true }
|
|
|
|
|
toml = { version = "0.8", optional = true }
|
2024-11-13 11:24:08 -06:00
|
|
|
|
log = "0.4"
|
|
|
|
|
env_logger = { version = "0.11", optional = true }
|
2024-11-12 22:22:48 -06:00
|
|
|
|
governor = { version = "0.7.0", features = ["dashmap"], optional = true }
|
2024-11-13 11:24:08 -06:00
|
|
|
|
thiserror = "2.0"
|
2024-11-13 15:12:55 -06:00
|
|
|
|
serde_json = "1"
|
2024-11-20 05:44:08 -06:00
|
|
|
|
wasm-bindgen = { version = "0.2", optional = true }
|
2024-11-14 23:54:59 -06:00
|
|
|
|
libc = { version = "0.2.162", optional = true }
|
|
|
|
|
axum-server = { version = "0.7.1", optional = true }
|
2024-11-15 01:05:02 -06:00
|
|
|
|
webp = { version = "0.3.0", optional = true }
|
2024-11-15 03:28:59 -06:00
|
|
|
|
url = { version = "2", optional = true }
|
2024-11-19 02:28:11 -06:00
|
|
|
|
tower-http = { version = "0.6.2", features = ["catch-panic", "timeout"], optional = true }
|
2024-11-19 03:23:28 -06:00
|
|
|
|
dashmap = "6.1.0"
|
|
|
|
|
lru = "0.12.5"
|
2024-11-20 05:44:08 -06:00
|
|
|
|
prometheus = { version = "0.13.4", optional = true }
|
2024-11-23 15:45:57 -06:00
|
|
|
|
xml = "0.8.20"
|
2024-11-12 22:22:48 -06:00
|
|
|
|
|
|
|
|
|
[build-dependencies]
|
|
|
|
|
chumsky = "0.9.3"
|
|
|
|
|
quote = "1.0.37"
|
|
|
|
|
serde = { version = "1.0.214", features = ["derive"] }
|
|
|
|
|
serde_json = "1.0.132"
|
|
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "yumechi-no-kuni-proxy-worker"
|
|
|
|
|
required-features = ["env-local"]
|