Hylang
Hylang is a C#-inspired programming language aimed at Australis OS and general x64 systems.
It features a full compiler pipeline — lexer, parser, AST, binder, type checker, and a bound IR — shared by both the interpreter and the C code emitter.
Current status
- Phase 2 is complete.
- Phase 3 runtime foundations are landed.
- Phase 4 workflow and tooling work is complete at local-first bootstrap scope.
- Phase 5 self-hosting preparation is complete at prototype scope.
- Phase 6 self-hosting has started with a Hydrogen-owned checker/IR/runtime-contract/codegen foundation and a tiny direct Linux x64 ELF output path.
- The current bootstrap can interpret and compile multi-file console applications, build static libraries, run workspaces through
hy, use a local filesystem package registry, and exercise a real build/test/fmt/check/package/LSP flow. hyrun,hyc build, andhyshare the same semantic pipeline, so interpreted and compiled behavior stays aligned at the language-semantics level.- The compiler now supports proof projects including
mini_frontend_model,managed_collections, the systems showcasehexlab, the SDK tooling proofsdk_demo, and the Hydrogen self-hosting workspaceself_hosting.
What Hylang looks like
namespace Greeter {
public class Program {
public static void Main(string[] args) {
string name = args[0];
System.Console.WriteLine("Hello, " + name + "!");
}
}
}
Key tools
| Tool | Purpose |
|---|---|
hy | Primary workflow CLI for scaffolding, building, running, testing, formatting, checking, and packaging |
hyrun | Run .hy scripts and .hyproj projects directly |
hyc build | Compile to a native executable or static library via a C backend |
Current language subset
using,namespace,class,struct,interface,enumpublic,private,internal,protected,static,virtual,override- Static methods and static fields
- Fields, constructors, methods — with overloading
- Single inheritance with
base(...),base.Member,virtual, andoverride - Interfaces, interface inheritance, and interface dispatch
- Structs with bootstrap by-value semantics and boxing to interfaces
- Generic classes, interfaces, and methods, plus
varlocal inference int,bool,string,T[],null- Arithmetic (
+,-,*,/,%), comparison (==,!=,<,<=,>,>=), logical (&&,||,!) if,while,for,break,continue,return- Object creation (
new), array creation (new T[count]), method calls, field access,this, assignment - String concatenation for
string,int, andboolcombinations System.Console.Write/WriteLine(also accessible asConsole.*withusing System;)System.IO.File.Exists,ReadAllText,WriteAllTextSystem.IO.File.ReadAllBytes,WriteAllBytes- Array and string
.Length, array indexing, string character indexing - Minimal bootstrap
System.Collections.List<T> - Safe bootstrap
System.Runtime.Buffer - Executable
unsafe, pointers,stackalloc,sizeof, andSystem.Runtime.Memory - Bootstrap
System.Runtime.BinaryPrimitivesthrough 64-bit read/write helpers
See the Getting Started chapter to build and run the compiler, the hy page for the current workflow CLI, the Runtime Model page for Phase 3 behavior, the Phase 5 Self-Hosting Preparation page for the Hydrogen compiler prototype, the Phase 6 Self-Hosted Compiler page for current native compiler work, and the Roadmap page for the current phase breakdown.