Zscript
The ZScript Compiler.
Install / Use
/learn @zscriptlang/ZscriptREADME
ZScript (Also called Zed Script)
ZScript is a modern, high-performance, typesafe language designed for application-scale development. While it feels familiar to JavaScript and TypeScript users, ZScript introduces advanced meta-programming capabilities—like Macros and Compile-time execution.
ZScript compiles to readable, standards-based JavaScript or can be bundled into native binaries for Bun, Node.js, and browser environments.
🚀 Why ZScript? (Beyond TypeScript)
ZScript includes everything you love about TypeScript (static typing, generics, interfaces) but adds powerful features that TS lacks:
comptime– Execute arbitrary async logic during compilation. Inline API data or Platform-Specific code or pre-calculate complex math before the code even reaches the user.macro– Native compile-time code generators. Splice logic directly into your source at call sites with!syntax.defer/queue– Reliable scope-exit cleanup (LIFO/FIFO), similar to Go and Zig.- Pipe Operator (
|>) – Clean, functional chaining for readable data processing. matchExpressions – A powerful, expression-based version ofswitchthat returns values directly.- Ergonomic Loops – Built-in
repeat N,forever, andunlessfor cleaner control flow. - Native Escape Hatch – Use
js { ... }blocks to write raw JavaScript without the compiler interfering.
📦 Core Features
Type System & Logic
- Advanced Typing: Nominal + Structural rules, Union types, Literal types, and Generics.
- Async First: Full support for
async/await, generators (fn*), andasync forloops. - Robust Declarations: Structs, Classes (static, extends, getters/setters), Enums, and Type Aliases.
Language Built-ins
- Pattern Matching:
matchexpressions with exhaustive checking. - Cleanup:
deferfor closing files/connections automatically. - Error Handling:
failshorthand for clean error throwing.
Module & Package Management
- Three-tier Resolution: Local →
zsc_modules→ NPM. - Built-in Registry: Native support for
pkg.zscript.us.kgand.zsparchives. - Header Generation:
.dhfiles automatically extract documentation and API surfaces.
🛠 Installation
Install the ZScript compiler (zsc) via Latest Releases. <br> Work in progress for the Install Scripts. <br> v1.0.0 : https://github.com/zscriptlang/zscript/releases/tag/v1.0.0
🤝 Contribute
ZScript is an open-source project and we welcome contributions! <br> Language proposal: You can propose for a feature in ZScript by making a issue for it. <br> Submit Bugs: Open an issue to help us improve. <br> Code Review: Check out our src/compiler to see how zsc works. <br> Registry: Publish your own ZScript packages to pkg.zscript.us.kg.
A note from Developer of ZScript.
Hi everyone, ZScript is a powerful language and a strong candidate for feature. Currently i am working on ZScript alone i will be very happy is some devs join me. <br> Please if you want to help, help me in buying A Domain for ZScript. Also need to mention some things which are the pillar of ZScript:
- Bun: Fast JS Runtime(Base of zsc).
- ANTLR: Powerful parser generator(Base of Grammar).
- Jules: This AI helped very much in coding the language.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
