Gloat just dropped on Hacker News, and it's the kind of project that makes you wonder why nobody built this sooner. The tool takes your Clojure or YAMLScript source code and grinds it through a multi-stage compilation pipeline all the way down to standalone executables, WebAssembly modules, or shared libraries—targeting over 20 different OS and architecture combinations in the process.

How the Compilation Pipeline Works

The magic happens in stages: .ys (YAMLScript) → .clj (Clojure) → .glj (Glojure intermediate) → .go (Go) → binary/wasm. Each step is transparent, meaning developers can inspect or modify any intermediate format using simple command-line flags like -t clj, -t glj, or -t go. This isn't black-box compilation—it's a full build pipeline you can debug at every layer.

Cross-Platform Compilation Without the Headache

Gloat handles Linux, macOS, Windows, FreeBSD, and more across amd64, arm64, and 386 architectures. A single command like gloat app.clj -o app.exe -p windows/amd64 produces a native Windows executable from Clojure source without requiring you to touch a Windows machine. The tool generates portable Go project directories that build anywhere with just Make.

WebAssembly and FFI for Maximum Portability

Beyond native binaries, Gloat outputs .wasm modules suitable for browsers or WASI environments. It also creates shared libraries (.so/.dylib/.dll) complete with C headers, enabling seamless FFI integration with nearly any programming language. Your YAMLScript function could become a Go library callable from Python, Rust, or Node.js in minutes.

Zero Dependencies by Design

Here's where Gloat gets clever: all required tools (Go, Glojure, YAMLScript, Babashka) auto-install on first use. No manual setup, no version conflicts to manage, no hunting for the right toolchain. Point gloat at your source file and it handles the rest—dependency resolution included.

Key Takeaways

  • Multi-stage compilation: .ys → .clj → .glj → .go → binary/wasm with full transparency
  • Cross-compile targeting 20+ OS/architecture combinations from a single machine
  • Native WebAssembly output for browser and WASI environments
  • Shared library generation (.so/.dylib/.dll) with C headers for universal FFI integration
  • Zero-dependency philosophy: tools auto-install on first run, no manual setup required

The Bottom Line

Gloat feels like the build tool functional programming enthusiasts have been asking for—bridging the expressiveness of Clojure and YAMLScript with Go's deployment simplicity. Whether you're building CLI tools or web assembly modules, this pipeline deserves serious attention from anyone tired of wrestling with complex toolchains.