Grayscale is a programming language for software that's simple to write and safe to run.
- Simplicity — Readable syntax with customizable keyword aliases. Helpful compile-time errors & warnings and runtime panics. Useful CLI commands like
gray man,gray fmt,gray new, andgray watch. - Flexibility — Build Scripts, microservices, CLI tools, or projects where you want to learn systems programming fundamentals
- Modularity — Beyond a small builtin core, everything else needs an import. Stdlib modules, your own
.grayfiles, and C headers can all be imported. - Safety — An automatic scope-based arena management memory model, bounds-checked arrays, strings, and maps, overflow-checked arithmetic, division-by-zero protection, nil pointer checks, stack depth guards, no implicit narrowing, NO pointer arithmetic. The guardrails are on unless you explicitly opt in to unsafe operations like raw pointers (
raw()), manual memory management (@mem), or threading (@threads)
@arrays · @strings · @maps · @math · @time · @random · @json · @io · @os
@http · @server · @crypto · @encoding · @uuid · @binary · @sqlite
@regex · @csv · @net · @threads · @sync · @channels · @mem · @atomic · @fmt · @strconv · @runtime
Download the latest release for your platform from the Releases page. No dependencies required.
Requires Go 1.23+ and a C compiler — GCC 7+ or Clang 5+ (GNU C extensions required).
git clone https://github.com/grayscale-lang/grayscale.git
cd grayscale
make build
make installGrayscale builds on Windows with MinGW-w64.
winget install BrechtSanders.WinLibs.POSIX.UCRT.Base # or: choco install mingw
git clone https://github.com/grayscale-lang/grayscale.git
cd grayscale
make buildmake build, make test, and make clean work the same as on macOS and
Linux. make needs a POSIX shell, which MSYS2 and Git Bash both provide.
The compiler finds MinGW in its default install locations automatically —
it does not need to be on PATH.
| Command | Description | Example |
|---|---|---|
gray <file> |
Compile and run | gray main.gray |
gray build <file> -o <name> |
Compile to a distributable binary | gray build main.gray -o myapp |
gray build <file> --emit-c |
Emit generated C source to a file (no binary) | gray build main.gray --emit-c |
gray build <file> --arena-limit=<size> |
Cap arena memory (KB/MB/GB; default: 1GB) | gray build main.gray --arena-limit=256MB |
gray check <file> |
Type check without compiling | gray check main.gray |
gray watch <file> |
Watch for changes, re-run on save | gray watch main.gray |
gray fmt <path> |
Format .gray source files in place |
gray fmt . or gray fmt ./... |
gray fmt --check <path> |
Check formatting without modifying files (CI gate) | gray fmt --check ./... |
gray doc <file> |
Generate docs from #doc attributes |
gray doc main.gray |
gray new <name> |
Scaffold a new project | gray new myproject |
gray report |
Print system info for bug reports | gray report |
gray update |
Update to the latest stable version | gray update |
gray update --pre |
Update to the latest pre-release (alpha/beta) | gray update --pre |
gray install <version> |
Install a specific version by semver | gray install x.y.z |
gray version |
Show version info | gray version |
gray man |
Show help for the man command | gray man |
gray man <module> |
Show info about a stdlib module | gray man strings |
gray man <function> |
Show info about a stdlib function | gray man to_upper |
gray man <struct> |
Show info about a stdlib struct type | gray man HttpRequest |
gray cross build <file> --target <target> |
Cross-compile for another platform via Zig | gray cross build main.gray --target linux-amd64 |
gray cross targets |
List supported cross-compilation targets | gray cross targets |
Note: Zig is only required for cross-compilation (
gray cross). Native builds use the system C compiler.
gray update # latest stable
gray update --pre # latest pre-release Note: The latest pre-release may be very out of date
gray install x.y.z # pin to an exact versiongray update checks for new versions, shows the changelog, and upgrades both the gray CLI and the compiler. Pass --pre to pick up the latest alpha, beta, or rc. Use gray install <version> to install an exact version by semver — downgrades and pre-release tags (e.g. 0.2.0-beta.1) are supported.
Grayscale was previously known as EZ. The ez update command from older EZ versions cannot upgrade to Grayscale automatically. To migrate, uninstall EZ and do a fresh install of Grayscale using the instructions in the Install section above.
- Language standard
- Contributing guide
- Benchmark suite —
make benchmarktimes real-shaped programs
Grayscale is in active development. The language is usable for personal projects and dev tools. Breaking changes may occur frequently.
MIT License - Copyright (c) 2025-Present Marshall A Burns
See LICENSE for details.
Thank you to everyone who has contributed to Grayscale!































