Skip to content

Architecture

mik is a WASI HTTP runtime with JavaScript orchestration capabilities, packaged as a single CLI.

ComponentTechnologyPurpose
HTTP Serverhyper 1.xAsync HTTP/1.1, graceful shutdown
WASM Runtimewasmtime 40WASI Preview 2 execution
Script RunnerrquickjsJavaScript orchestration
CachemokaLRU module caching
Circuit BreakercustomFailure isolation

All handler routes use /run/<module>/* pattern:

RouteHandler
/run/auth/*modules/auth.wasm
/run/users/*modules/users.wasm
/script/checkout/*scripts/checkout.js
/healthBuilt-in health check
/metricsPrometheus metrics
mik/
├── src/
│ ├── commands/ # CLI commands (new, build, run, etc.)
│ ├── runtime/ # WASM runtime, AOT cache
│ ├── daemon/ # Background services (KV, SQL, etc.)
│ └── manifest.rs # mik.toml parsing
├── docs/ # Documentation (Astro)
└── examples/ # Example projects