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.
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.
- 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.
- Pattern Matching:
matchexpressions with exhaustive checking. - Cleanup:
deferfor closing files/connections automatically. - Error Handling:
failshorthand for clean error throwing.
- 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.
Install the ZScript compiler (zsc) via Latest Releases.
Work in progress for the Install Scripts.
v1.0.0 : https://github.com/zscriptlang/zscript/releases/tag/v1.0.0
ZScript is an open-source project and we welcome contributions!
Language proposal: You can propose for a feature in ZScript by making a issue for it.
Submit Bugs: Open an issue to help us improve.
Code Review: Check out our src/compiler to see how zsc works.
Registry: Publish your own ZScript packages to pkg.zscript.us.kg.
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.
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.
