pardnchiu/HakoRun
Last updated
[!NOTE] This README was generated by SKILL, get the ZH version from here.
SELF-HOSTED FAAS, NO DOCKER OR KUBERNETES REQUIRED
A Go self-hosted FaaS with sandboxed code execution, timestamp-versioned scripts, and SSE streaming
Table of Contents
Features
git clone https://github.com/pardnchiu/HakoRun && cd HakoRun && make run· Documentation
- Upload to Deploy — Upload a Python, JavaScript, or TypeScript function and invoke it over HTTP at
/run/<path>, with the return value auto-tagged asstring,number,json, ortext. - OS-native Sandbox — Linux runs scripts in Bubblewrap with every namespace unshared, no network, and all capabilities dropped; macOS confines writes to
$HOMEthrough a seatbelt profile. - systemd Slice Resource Caps — On Linux every script process runs under
hakorun.slice, whose CPU quota and memory ceiling keep one script from starving the host. - Timestamp-versioned Storage — Each upload creates a new version you can pin with
?version=, stored in embedded ToriiDB by default or Redis via-tags redis. - SSE Streaming with Instant Abort — Stdout lines stream as
logevents, and any stderr output, timeout, or client disconnect kills the process.
Architecture
graph TB
Client[Client] -->|POST /upload| Upload[Upload]
Client -->|POST /run/*path| Run[Run]
Client -->|POST /run-now| RunNow[RunNow]
Upload --> Store[(ToriiDB / Redis)]
Run --> Store
Run --> Sandbox[Sandbox]
RunNow --> Sandbox
Sandbox --> Out[JSON / SSE]
Out --> Client
License
This project is licensed under the MIT LICENSE.
Author
Just open an issue to share an idea.
©️ 2025 邱敬幃 Pardn Chiu