Want the power of C without shooting yourself in the foot? Considering Zig but want cleaner syntax? Start with Janus. Janus compiles through Zig – you get Zig’s entire stdlib, LLVM backend, and bare-metal performance with syntax that reads like intent, not like noise. Humans read it. AI agents write it. The compiler proves it. One language. Two faces. Zero compromise.
v2026.3.23
janus fmt ships — canonical formatter with 34 idempotency-verified tests. --check mode with line-by-line diff output for CI. Dogfooded on 1,056-line production file. janus build reads janus.lock — compiles dependencies from local registry, links into binary. :service profile fully green — nested using verified at 3 levels. Hinge integration: deduplicated modules, proper KDL serialization, transitive lockfile. println compiler fix. SPEC-FMT specification committed.
v2026.3.18
First-class compile-time evaluation. comptime do...end blocks, $size_of/$type_info meta-sigil builtins. Checked arithmetic. 14 builtins. 1,700+ tests.
v2026.3.15
+1,500 line parser overhaul. ++ concatenation operator. @ builtin prefix. Struct methods, const decls, default field values. Anonymous enums with backing types. fn alias for func. Monomorph cache memory leak eliminated. i32→i64 type widening for string and array ops. Hinge registry HTTP scaffold.
v2026.3.14
Pure Janus ZSTD codec (RFC 8878, zero dependencies). Native TLS backend via std.net.tls. HTTPS wired into HTTP client. std.gtp and std.hinge stdlib modules. Graf integration for Hinge — publish, lockfile migration, graf.lock.json. Supertrait syntax and oracle. 236-test HTTP stack.
v2026.3.12
:service profile pipeline complete. std.crypto with L1 SoulKey identity. SBI module (std.sbi). Base32 and KDL encoders. Socket primitives. Sovereign Binary Interface bridge. Capsule structure for crypto, hash, and time.
v2026.3.10
Documentation as structured data in the ASTDB. janus doc generates Markdown from /// comments. janus query --doc filters by predicate. Hinge sovereign supply chain (25 modules, 18K LOC). Generic monomorphization, supertrait propagation, std.core.conv.
Every design decision in Janus flows from three immutable principles.
The source code, the intermediate representation, and the final binary all tell the same story. No hidden transformations. No magic. You read the code; you know what it does.
The compiler provides levers; not opinions. Janus gives you the simplest correct mechanism and lets you decide the policy. No defaults that secretly optimize against your intent.
If something is expensive, the syntax makes it visible. Dynamic dispatch costs cycles? You see &dyn Trait. Allocation happens? You see the allocator. The cost is always in the code.
Beautiful syntax. Honest semantics. No exceptions; no sugar in :core.
// The simplest honest program. func main() do println("Hello, Sovereign World.") end
// Verbose? Never. Janus is as terse as you want it to be. func clamp(x: i64, lo: i64, hi: i64) -> i64 = match x { _ if x < lo => lo, _ if x > hi => hi, _ => x } func is_prime(n: i64) -> bool = n > 1 and for 2..isqrt(n)+1 do |i| n % i != 0 end func fizzbuzz(n: i64) -> string = match (n%3, n%5) { (0,0) => "FizzBuzz", (0,_) => "Fizz", (_,0) => "Buzz", _ => itoa(n) } // Same language. Same compiler. Your call.
trait Drawable { func draw(self) -> i32 } struct Circle { radius: i32 } impl Drawable for Circle { func draw(self) -> i32 do return self.radius * 2 end } // Dynamic dispatch. Cost is visible. func render(d: &dyn Drawable) -> i32 do return d.draw() end
func parse_port(s: string) -> i32 ! ParseError do let n = to_int(s) catch |e| do fail ParseError.InvalidNumber end if n < 0 or n > 65535 do fail ParseError.OutOfRange end return n end
func fetch_all(urls: []string) do nursery |n| do for url in urls do n.spawn(async fetch(url)) end end // All tasks complete or cancel here. end
const Ed25519 = std.crypto.sign.Ed25519; pub const SoulKey = struct { seed: [32]u8, public: [32]u8, pub fn sign(self: *const SoulKey, msg: []const u8) [64]u8 do const kp = Ed25519.KeyPair .generateDeterministic(self.seed) catch return .{0} ** 64; return kp.sign(msg, null).toBytes(); end }; // Zig types. Janus syntax. One binary.
// Sovereign package manifest. project { name "myservice" version "1.0.0" profile "service" } dependencies { crypto "^2.1.0" // Verified supply chain } // Ed25519 signed. BLAKE3 content-addressed. // Publish: janus pkg publish --key id.key
Janus compiles through Zig to LLVM to native. Not a transpiler – one fused compilation unit. Every stage is inspectable.
Start simple. Scale to sovereign. No rewrite required.
Everything listed here compiles, runs, and is tested. Today.
Traits, impl blocks, static + dynamic dispatch with vtables. Fat pointers for &dyn Trait. Default methods. Complete polymorphism system.
Nurseries, spawn, await, select, channels. M:N fiber scheduler with 5,249 lines of battle-tested runtime. CSP done right.
Code stored as a semantic database with content-addressed identity. AI and tooling can query structure, not parse text. UUID-stable refactoring.
T ! E error types, fail, catch, try. Errors are values, not exceptions. The type system tracks what can fail.
Zero-capture, captured, mutable capture. Three clean closure types with explicit capture semantics. No hidden allocations.
Janus compiles through Zig – not to it, not beside it. use zig and you write Janus syntax with Zig’s type system, crypto, I/O, and allocators. No FFI. No bindings. Same binary. Ed25519 in do..end blocks.
comptime do...end blocks, $size_of/$type_info meta-sigil builtins, inline for/inline switch. Checked arithmetic, resource-limited evaluation. Profile-gated — :core gets basics, :service gets introspection.
match on integers, enums, tagged unions. Exhaustiveness checking. The right arm fires; the rest don't exist.
Monomorphized generics. Scoped Impl Resolution — no orphan rules. Julia-style multi-dispatch on ALL arg types. 13K LOC dispatch engine.
Sovereign Binary Interface — zero-encoding where wire = memory. Decode is a pointer cast, not deserialization. BLAKE3 Merkle proofs for field-level verification. Comptime schema fingerprinting. No protoc, no IDL, no codegen.
Sovereign supply chain. Ed25519 + Dilithium3 hybrid signatures, BLAKE3 content addressing, Chapter federation, witness consensus, trust graphs, DMP gossip, transparency ledger. 25 modules, 18K LOC.
Documentation is data, not decoration. /// comments are parsed into structured columnar arrays — queryable by predicate. janus doc generates Markdown. janus query --doc finds undocumented, deprecated, or incomplete declarations. Docs survive renames via CID identity.
janus fmtCanonical formatter. One style. No arguments. janus fmt file.jan formats in-place; --check mode exits non-zero with a line-by-line diff for CI. 34 idempotency-verified tests. Dogfooded on 1,000+ line production code. A language without fmt tolerates arguments about whitespace. Janus doesn’t.
"A language is not a tool. It is a discipline."
Green where we deliver. Red where we don't. Yet.
| Feature | Janus | Go | Rust | Zig |
|---|---|---|---|---|
| Trait System | ✓ Traits + impl, static + dynamic dispatch | ✓ Interfaces | ✓ Traits + impls | ✗ Duck typing |
| Generics | ✓ Monomorphized — identity[T] compiles natively | ✓ Since Go 1.18 | ✓ Full generics + traits | ✓ Comptime generics |
| Multi-Dispatch | ✓ Julia-style — resolves on ALL arg types | ✗ Single dispatch only | ✗ Single dispatch (self only) | ✗ No dispatch system |
| Scoped Impl Resolution | ✓ No orphan rules — 5-stage SIR pipeline | ✗ No trait system | ✗ Orphan rule restricts impls | ✗ No trait system |
| Structured Concurrency | ✓ Nurseries — no orphan tasks | ✗ Goroutines leak freely | ✗ tokio::spawn is unstructured | ◐ Has async frames |
| Error Handling | ✓ Error unions T ! E | ✗ if err != nil boilerplate | ✓ Result<T,E> + ? operator | ✓ Error unions + try |
| Syntax Clarity | ✓ do/end blocks, clean grammar | ◐ Simple but verbose | ✗ Lifetime annotations, turbofish | ◐ Comptime complexity |
| Native Compilation | ✓ LLVM via Zig toolchain | ✓ Go compiler | ✓ LLVM | ✓ LLVM + self-hosted |
| Zig Stdlib Access | ✓ native — one compilation unit, not FFI | ✗ CGo overhead | ✗ Separate FFI | ✓ Native |
| Enum/Union Types | ✓ Tagged unions + match | ✗ No sum types | ✓ enum + match | ✓ Tagged unions |
| Compile-Time Evaluation | ✓ comptime blocks, $builtins, inline for/switch | ✗ No comptime | ◐ const fn (limited) | ✓ Full comptime |
| Sovereign Packages | ✓ Hinge — signed, federated, post-quantum | ◐ go mod (centralized) | ◐ crates.io (centralized) | ✗ No package manager |
| Binary Wire Format | ✓ SBI — zero-encoding, BLAKE3 Merkle proofs | ◐ protobuf (varint encode/decode) | ◐ serde (ecosystem, not built-in) | ✗ No standard wire format |
Janus v2026.3.23 — :core + :service profiles complete. janus fmt canonical formatter. janus build reads lockfile and compiles dependencies. Hinge sovereign package manager with full local lifecycle. One Language, Two Faces: Janus syntax fused with Zig’s type system and stdlib in a single compilation unit. No FFI. No bindings. Multi-dispatch, scoped impl resolution, trait-bounded generics, sovereign federated packages, and queryable documentation are unique to Janus.
Fixed-size structs, same architecture. Zero encoding. Zero parsing. Zero copies.
| Dimension | SBI | SSZ | Protobuf | FlatBuffers | Cap'n Proto |
|---|---|---|---|---|---|
| Encode Cost | ✓ Zero (memcpy identity) | ◐ LE pack + offsets | ✗ Varint encode per field | ◐ Vtable + buffer build | ◐ XOR + offset calc |
| Decode Cost | ✓ Pointer cast (O(1)) | ◐ Offset walk | ✗ Full varint decode | ◐ Vtable lookup | ◐ Deref + XOR |
| Wire = Memory | ✓ Exact identity | ✗ Packed, no alignment | ✗ Varint encoding | ◐ Structs only (LE) | ◐ Nearly (XOR defaults) |
| Merkle Proofs | ✓ BLAKE3, field-level | ✓ SHA-256, generalized | ✗ None | ✗ None | ◐ Flat hash only |
| External Tooling | ✓ None — compiler is schema | ✓ None (implicit) | ✗ protoc + plugins | ✗ flatc + plugins | ✗ capnpc + plugins |
| Schema Evolution | ✗ None (by design) | ✗ None formal | ✓ Field numbers | ◐ Tables only | ✓ Append-only |
| Variable-Length Data | ◐ Planned (:service) | ✓ Offset tables | ✓ LEN wire type | ✓ Vectors, strings | ✓ Lists, text |
| Language Support | ◐ Janus + Zig | ◐ ~8 (Ethereum) | ✓ 30+ languages | ✓ 14+ languages | ✓ ~16 languages |
SBI is not a general-purpose serialization framework. It is the fastest possible wire format for a constrained domain: same-architecture peers, fixed-size structs, cryptographic type identity. Schema evolution and variable-length data trade correctness for flexibility — SBI chooses correctness. Full SBI documentation →
You know the drill. Requires Zig 0.16.x.
# Clone and build (requires Zig 0.16.x) git clone https://git.sovereign-society.org/janus/janus-lang.git cd janus-lang && zig build # Scaffold a new project ./zig-out/bin/janus init myproject cd myproject # Build and run ../zig-out/bin/janus build src/main.jan main && ./main # "Hello from Janus!" # 1,700+ tests passing zig build test
Green means working code with passing tests. Yellow means specified. Blue means dreamed.