ZScript is a lightweight, expressive scripting language inspired by Python β but with its own minimalist and expressive style. It supports Unicode and emoji identifiers, functional programming constructs, file I/O, and can be embedded as a shared C library. Whether you're automating tasks, scripting games, or exploring creative code, ZScript makes it simple and fun.
var hello = "Hello, World!";
println(hello); // Outputs: Hello, World!
π Explore language features in the Usage Guide β
- π Unicode & Emoji Identifiers β Name variables
Ο
,π±
, or any emoji you like. - π§ Familiar Python-like Syntax β Use
var
,const
,func
,if
,for
, and more. - βοΈ Builtβin Functions β
clock()
,shuffle()
,random_between()
and others built-in. - π File I/O β
read_file()
andwrite_file()
to handle files natively. - π§± Structs & Closures β Define custom types and encapsulate behavior.
- π§ LinuxβOnly β Runs out of the box on most Linux distributions.
- 𧬠Embeddable VM β Integrate ZScript with C, Go, Rust, or C++ applications.
Get the latest prebuilt binaries and development files from the Releases β:
- π€ VM Executable: Download
zvm
- π§ Development Files:
- π¦ Full Release Bundle (VM + Libs + Headers):
zscript-release.zip
- OS: Linux (Debian, Ubuntu, Fedora, Arch, etc.)
- Tools:
gcc
,make
,pkg-config
,libffi
,readline
- Go (Golang)
System-wide:
curl -sL https://github.com/cryptrunner49/zscript/raw/refs/heads/main/install.sh | bash -s -- install --system
User-only:
curl -sL https://github.com/cryptrunner49/zscript/raw/refs/heads/main/install.sh | bash -s -- install --user
git clone https://github.com/cryptrunner49/zscript.git
cd zscript
make vm
./bin/zvm samples/scripts/rpg_game.z
ZScript is easy to embed in other languages like C, Go, C++, and Rust.
#include "libzscript.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
ZScript_Init(argc, argv);
if (argc > 1) {
ZScript_RunFile(argv[1]);
} else {
int exitCode;
char* result = ZScript_InterpretWithResult("1 + 2;", "<script>", &exitCode);
if (exitCode == 0) printf("Last value: %s\n", result);
else printf("Execution failed with code %d\n", exitCode);
free(result);
}
ZScript_Free();
return 0;
}
make lib
gcc -o run_sample samples/lib/c/sample.c -Lbin -lzscript -Ibin
LD_LIBRARY_PATH=bin ./run_sample
Find ready-to-run embedding samples in:
These show how to use ZScript with FFI across different ecosystems.
sudo apt update
sudo apt install gcc pkg-config make golang libffi-dev libreadline-dev
Whatβs next for ZScript?
- Elif
- Pattern Matching
- Switch Statement
- Enums
- Error Handling
- Standard Library
β¨ Track progress or suggest features via Issues β
Weβd love your help! Whether it's fixing bugs, improving docs, or proposing featuresβyour contributions matter.
π See the Contributing Guide β to get started.
ZScript is licensed under the GNU GPL-3.0.
See the LICENSE for details.