{"slug": "i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my", "title": "I Built a Self-Hosting Language, a DB Engine and a Microkernel — Entirely on My Phone", "summary": "A developer has built SahajCore, a self-hosting programming language, along with a database engine and a microkernel, entirely on an Android phone using Termux. The project includes a bytecode compiler, a stack VM, and transpilers to C and WebAssembly, with the interpreter written in SahajCore itself. The developer shared the project on GitHub and is open to discussing the implementation details.", "body_md": "No laptop. No IDE. Just Termux and a text editor.\n\nOver the past year I shipped five systems from my Android phone:\n\nHere's how the core works.\n\nThe pipeline is classic:\n\nsource → tokenizer → recursive-descent parser → AST\n\n→ tree-walk interpreter\n\n→ bytecode compiler → stack VM\n\n→ C / WAT transpilers\n\nThe bytecode compiler emits a flat instruction list. This is real output\n\nfrom `sahajcore --compile`\n\n:\n\n```\n0004 LOAD a\n0005 LOAD b\n0006 CONST 2\n0007 BIN *\n0008 BIN +\n0009 STORE c\n0014 BIN >\n0015 JZ 19\n```\n\nThe interpreter is written in SahajCore itself. The bootstrap chain:\n\nPython-hosted interpreter\n\n→ runs selfhost.sahaj (interpreter written in SahajCore)\n\n→ runs target.sahaj (user program)\n\nThe hardest bug: recursive Fibonacci blew the Python stack because every\n\ntarget-level call expanded into hundreds of host frames. Fix: rewrote the\n\ndemo iteratively and raised the recursion limit.\n\nA tiny relational engine with:\n\n```\npip install sahajcore\npip install sahajql\n```\n\nGitHub: github.com/sayan9168/SahajCore\n\nHappy to go deep on any part — ask me anything.", "url": "https://wpnews.pro/news/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my", "canonical_source": "https://dev.to/sayan9168/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my-phone-2edc", "published_at": "2026-08-30 10:17:41+00:00", "updated_at": "2026-08-30 10:52:34.010420+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["SahajCore", "Termux", "GitHub", "sayan9168"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my", "markdown": "https://wpnews.pro/news/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my.md", "text": "https://wpnews.pro/news/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my.txt", "jsonld": "https://wpnews.pro/news/i-built-a-self-hosting-language-a-db-engine-and-a-microkernel-entirely-on-my.jsonld"}}