Gloat compiles Clojure & YAMLScript to Go code, native binaries and Wasm
The Compilation Pipeline¶
.ys →
.clj →
.glj →
.go →
binary/wasm
Gloat takes your Clojure or YAMLScript source code and compiles it through multiple stages to produce standalone executables, WebAssembly modules, or shared libraries; for 20+ OS/Architecture combinations.
Each intermediate format can be output for inspection or further processing.
Key Features¶
🚀
Zero Dependencies
All tools (Go, Glojure, YAMLScript, Babashka, etc) auto-install on first use. No manual setup required.
🌍
Cross-Compile
Build for Linux, macOS, Windows, FreeBSD, and more. Multiple architectures: amd64, arm64, 386.
🕸️
WebAssembly
Compile to Wasm for browser or WASI environments. Run your code anywhere.
📚
Shared Libraries
Create .so/.dylib/.dll files with C headers. Integrate with nearly any programming language via FFI.
🔍
Transparent Pipeline
Output any intermediate format (Clojure, Glojure, Go). Understand and debug every step.
📦
Portable Builds
Generate standalone Go project directories. Build anywhere with just Make.
Quick Example¶
# Compile to native binary
gloat hello.ys
# Cross-compile for Windows
gloat app.clj -o app.exe -p windows/amd64
# Create WebAssembly module
gloat program.ys -o program.wasm
# Output intermediate formats
gloat code.ys -t clj # See generated Clojure
gloat code.ys -t glj # See generated Glojure
gloat code.ys -t go # See generated Go
# Create a Go build directory
gloat code.ys -o code/
make -C code/ build # Compile to binary
Get Started¶
Ready to compile your Clojure or YAMLScript code?