Powered by the axum web framework for async concurrency without garbage collection overhead. Exposes first-class Prometheus observability, mimalloc-accelerated allocation, and compile-time registry never breaks the codebase.
Playground β’ Contributing β’ Report Issues
Managing tag registries across multiple Discord bots is a maintenance nightmare. When a new character-series drops, every bot project must be edited individually β update the list, rebuild, redeploy. Teams maintaining 5, 10, or 20 bots end up copy-pasting the same 100+ character array across repos, creating drift between deployments. One bot gets "sandrone_(genshin_impact)", "lauma_(genshin_impact)", "anis_(star)_(nikke)", and etc.. with correct formatting, another uses a stale alias. There is no single source of truth, no centralized versioning, and no way to propagate updates without touching each codebase by hand.
@ScathachGrip/teivax decouples the tag registry from all bot code. Instead of embedding character lists in every project, point all your bots at a single HTTP endpoint. Add or update tags in one place β teivax β and every bot picks up the change on its next request. The registry is compile-time constant, served with sub-millisecond latency, and needs no database, no cache warming, and no runtime synchronization. One cargo build propagates new characters to every consumer.
ββββββββββββββββββββββββββββββββ
β HTTP Client β
β (curl / browser / bots) β
ββββββββββββββββ¬ββββββββββββββββ
β
β GET /, /:id, /health
β GET /metrics, /loadavg
v
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β axum HTTP Server (0.7) β
β β
β ββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββ β
β β data_router β β metrics_router β β
β β (CORS permissive, tracing, prom) β β (no CORS, direct scrape) β β
β β β β β β
β β GET / β β GET /metrics β β
β β GET /:id β β GET /debug/mimalloc β β
β β GET /health β ββββββββββββββββββββββββ¬ββββββββββββββββββββ β
β β GET /loadavg β β β
β β GET /data β v β
β β GET /global_anime_girls β ββββββββββββββββββββββββββββββββββββββββββββ β
β β GET /blocklists β β prometheus metrics β β
β β GET /playground β β (axum-prometheus + metrics 0.23) β β
β ββββββββββββββββββββ¬ββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β v β
β ββββββββββββββββββββββββββββββββββββββββ β
β β handlers β β
β β index() β REGISTRY β β
β β get_anime() β by_id() β β
β β health() β "ok" β β
β β loadavg() β sysinfo::System β β
β ββββββββββββββββββββ¬ββββββββββββββββββββ β
β β β
β v β
β ββββββββββββββββββββββββββββββββββββββββ β
β β data.rs β β
β β Anime struct β β
β β REGISTRY: &[Anime] β β
β β by_id(id) β Option<&Anime> β β
β ββββββββββββββββββββ¬ββββββββββββββββββββ β
β β β
β βββββββββββ΄ββββββββββ β
β v v β
β ββββββββββββββββββ ββββββββββββββββββ β
β β nikke.rs β β arknights.rs β ... 25 more tag files β
β β 106 tags β β 70 tags β β
β ββββββββββββββββββ ββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Background Tasks (tokio::spawn) β β
β β β β
β β ββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββ β β
β β β system_updater() β β dump_json() β β β
β β β every N seconds: β β on startup: β β β
β β β β’ sysinfo::System::* β β β’ write json/{id}.json β β β
β β β β’ CPU / mem / disk / net β β β’ best-effort β β β
β β β β’ process info / threads β ββββββββββββββββββββββββββββββββββββββββββ β β
β β ββββββββββββββββββββββββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
v
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Filesystem β
β β
β json/ β
β βββ nikke.json <ββ dump_json() writes β
β βββ arknights.json β
β βββ genshin.json β
β βββ global_anime_girls.json β
β βββ blocklists.json β
β βββ ... β
β β
β playground/ β
β βββ index.html <ββ gen_playground binary β
ββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
v
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Global State (const) β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β REGISTRY (compile-time) β β
β β &[Anime; 25] β β
β β β’ id: &'static str β β
β β β’ title: &'static str β β
β β β’ provider: &'static str β β
β β β’ tags: &'static [&'static str] β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β AppState (runtime) β β
β β started: Instant β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β mimalloc::MiMalloc (global allocator) β β
β β /debug/mimalloc exposes extended stats β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| NOTE: Rust 1.96.0 or higher / or simply just use docker |
Rust toolchain with cargo is required. The build is self-contained β no external services, no database, no runtime config beyond env vars. Choose one of:
docker pull ghcr.io/scathachgrip/teivax:latest
docker run -p 3000:3000 -d ghcr.io/scathachgrip/teivax:latestcargo build
./target/debug/teivax# Windows
.\build.cmd
.\target\debug\teivax.exe| Env | Default | Notes |
|---|---|---|
PORT |
3000 |
TCP bind on 0.0.0.0 |
RUST_LOG |
info |
tracing EnvFilter |
.env auto-created from .env.schema on first run.
| Route | Returns | Description |
|---|---|---|
GET / |
JSON | Alive check β version, server location, memory stats |
GET /data |
JSON | Registry index β all supported anime with tag counts |
GET /:id |
JSON | Tag data for an ID (e.g. /nikke, /data_gif) |
GET /global_anime_girls |
JSON | Global anime girls dataset |
GET /blocklists |
JSON | Blocklist entries per category |
GET /playground |
HTML | Browser UI (requires gen_playground) |
GET /health |
text | "ok" |
GET /loadavg |
JSON | System load average {one, five, fifteen} |
GET /metrics |
text | Prometheus metrics |
GET /debug/mimalloc |
JSON | mimalloc allocator stats |
{
"entries": [
{
"id": "nikke",
"title": "Nikke",
"provider": "rule34",
"tag_count": 106,
"endpoint": "/nikke"
}
],
"endpoints": [
"/health",
"/metrics",
"/data",
"/global_anime_girls",
"/blocklists"
]
}Unknown ID returns 404 Not Found with body unknown anime: <id>.
| ID | Title | Provider | Type | Entries |
|---|---|---|---|---|
genshin |
Genshin Impact | rule34 | tags | 79 |
fgo |
Fate/Grand Order | rule34 | tags | 118 |
nikke |
Nikke | rule34 | tags | 106 |
arknights |
Arknights | rule34 | tags | 70 |
bluearchive |
Blue Archive | rule34 | tags | 73 |
azurlane |
Azur Lane | rule34 | tags | 66 |
genshin_danbooru |
Genshin Impact (Danbooru) | danbooru | tags | 36 |
honkai_starrail |
Honkai: Star Rail | rule34 | tags | 50 |
girls_frontline |
Girls' Frontline | rule34 | tags | 39 |
naruto |
Naruto | rule34 | tags | 30 |
bleach |
Bleach | rule34 | tags | 31 |
vtubers |
VTubers | danbooru | tags | 196 |
danbooru_sex |
Danbooru Sex Tags | danbooru | tags | 64 |
data_gif |
GIFs | others | gif | 2792 |
data_gif_nsfw |
NSFW GIFs | others | gif | 5194 |
gif_sex |
GIF Sex Tags | others | tags | 30 |
hentai_yandere |
Hentai Yandere Tags | yandere | tags | 49 |
ai_sex |
AI Sex Tags | others | tags | 3 |
wuthering_waves |
Wuthering Waves | rule34 | tags | 34 |
zenless_zone_zero |
Zenless Zone Zero | danbooru | tags | 42 |
uma_musume |
Uma Musume | rule34 | tags | 59 |
honkai_impact |
Honkai Impact 3rd | danbooru | tags | 27 |
one_piece |
One Piece | rule34 | tags | 8 |
league_of_legends |
League of Legends | rule34 | tags | 23 |
persona |
Persona | danbooru | tags | 21 |
| global_anime_girls | β | β | β | special dataset |
| blocklists | β | β | β | blocklist entries |
On startup, the server writes json/{id}.json for each anime and json/global_anime_girls.json, json/blocklists.json. Best-effort β failures logged, not fatal.
You can check available tests on cargo/config.toml and Makefile.toml.
Audit tag registries against live API post counts:
cargo make check-entries <name>Examples:
# danbooru-provider
cargo make check-entries genshin_danbooru
cargo make check-entries vtubers
cargo make check-entries danbooru_sex
cargo make check-entries honkai_impact
cargo make check-entries zenless
cargo make check-entries persona
# rule34-provider
cargo make check-entries genshin
cargo make check-entries fgo
cargo make check-entries nikke
cargo make check-entries arknights
cargo make check-entries bluearchive
cargo make check-entries azurlane
cargo make check-entries honkai_starrail
cargo make check-entries girls_frontline
cargo make check-entries naruto
cargo make check-entries bleach
cargo make check-entries uma_musume
cargo make check-entries one_piece
cargo make check-entries league_of_legends
cargo make check-entries wuthering_wavesTo ensure nasty tags or ambiguous wildcard exists, manual clean up is required.
This will surface a new file target/check_<name>_output.txt example:
TAG POST_COUNT
---------------------------------------------------------------------------
raiden_shogun 23755
ganyu_(genshin_impact) 15595
yae_miko 14832
lumine_(genshin_impact) 14759
mona_(genshin_impact) 13786
hu_tao_(genshin_impact) 12982
eula_(genshin_impact) 10210
=== SUMMARY ===
Total: 79
Total posts: 258407
Output: E:\Ferris\teivax\target\check_genshin_output.txt
[cargo-make] INFO - Build Done in 110.88 seconds.| Command | Description |
|---|---|
cargo build |
Build debug |
cargo make build |
Same, via cargo-make |
cargo dev |
cargo run alias |
cargo make run |
Run server binary |
cargo release |
cargo run --release --bin teivax alias |
cargo make check |
cargo check |
cargo make lint |
Clippy with deny warnings |
cargo make fmt |
Format all |
cargo make test |
Run tests |
cargo make qlty |
Run Qlty check (linters + analyzers) |
cargo make qlty-smells |
Qlty code smells only |
cargo make check-entries <name> |
Audit tag registry live counts |
See .cargo/config.toml for aliases and Makefile.toml for cargo-make tasks.
cargo run --bin gen_playgroundGenerates playground/index.html β a browser UI for browsing tags. Served at /playground. Deployed to GitHub Pages via CI.
Prometheus metrics at /metrics:
- System: CPU, memory, swap, loadavg, disk, network
- Process: CPU, RSS, virtual mem, threads, disk I/O, status
- mimalloc: commit, RSS, reserved, fragmentation, arenas, heaps, threads
- App: HTTP request count/duration, JSON dump timing, anime tag counts
- Tokio: worker thread count
| Concern | Crate | Version |
|---|---|---|
| HTTP server | axum |
0.7 |
| Runtime | tokio |
1 |
| Allocator | mimalloc (extended) |
0.1 |
| Metrics | axum-prometheus + metrics |
0.7 / 0.23 |
| System info | sysinfo |
0.32 |
| Serialization | serde + serde_json |
1 |
| Logging | tracing + tracing-subscriber |
0.1 / 0.3 |
| HTTP middleware | tower-http (cors, trace) |
0.5 |
| Env loading | dotenvy |
0.15 |
- Create
src/data/my_config.rs:pub const TAGS: &[&str] = &[ "character_name_(my_config)", ];
- Add
pub mod my_config;tosrc/data.rs - Add entry to
REGISTRY:Anime { id: "my_config", title: "my_config", provider: "rule34", tags: my_config::TAGS },
cargo build
process_open_fdsalways0.0βopen_files()requiressysinfo >= 0.33, project pinned at0.32system_cpu_brandandprocess_memory_used_bytesgauges are described but not populatedloadavgreturns zeros on Windows (platform limitation)imageboards/*.ts,custom_bot/client/*.tsare reference data only β not compiled, not read at runtime
en_US β’ /tayΒ·vaks/ β Tei (Teyvat, Genshin reference; reflects the project's primary data source) + Ax (shorthand for Axum, the Rust web framework).
This tool can be freely copied, modified, altered, distributed without any attribution whatsoever. However, if you feel like this tool deserves an attribution, mention it. It won't hurt anybody.
Licence: WTF.
