Releases: gengoscript/gengo
v0.5.0-pre2
See CHANGELOG for details.
v0.5.0-pre1
See CHANGELOG for details.
v0.4.1
Patch release: v0.4.0 shipped no binaries because the release workflow failed to cross-compile. Language and runtime content is identical to v0.4.0 — see those notes for what's new in 0.4.
Fixed — Cross-Platform Release Builds
- macOS —
timeval.usecisc_inton Darwin buti64on Linux; thecap:netdeadline code now casts to the platform's field types. - Windows —
cap:fsread/exists usedstd.posix.openat(absent on Windows) since the post-v0.3.1 perf rewrite (#73); on Windows they fall back to thestd.Ioimplementation that v0.3.1 shipped.
No behavior changes on Linux.
Full changelog: CHANGELOG.md · v0.3.1...v0.4.1
v0.4.0
Warning
No binaries. The release build failed to cross-compile (macOS timeval widths, Windows cap:fs). Binaries shipped in v0.4.1, which is content-identical apart from the build fixes. The notes below remain the 0.4 release notes.
The release where the type system stopped negotiating — and the engine learned to say its own name.
Breaking
- Strict nominal types. Named values no longer mix with bare base values in arithmetic or comparison:
Severity(4) >= 3is aTypeError. WriteSeverity(4) >= Severity(3)or unwrap withint(s). Subtypes still mix with their parent type. - Strict int/float ordering comparisons.
1.5 > 1is now aTypeError, matching arithmetic (1.5 + 1was already rejected). Convert one side explicitly —1.5 > float(1)— or write the literal as1.0. Equality (==) is unchanged and still evaluates tofalseacross types.
Improved
- Runtime errors explain themselves (#107). Type and range errors name the operand types and suggest a remedy (
cannot apply '>' to float and int; use matching numeric types such as 2.0 or float(2)), and the REPL prints the same--> repl:line:collocation and caret block as file mode. - Heap scaling (#104). Slab size classes scale with the configured heap (up to 2 MiB blocks), a new 16 MiB
serverpreset joinstiny/dev/stress, and allocations above the block ceiling fail gracefully withAllocationTooLargeinstead of OOM. - String safety (#101). The
.stringimmortality invariant is enforced with a debug tripwire; GC-safety fixes infs.list, the split family, and dynamic string concat. std.mathabs/min/max/signpreserveintinputs instead of widening to float.
Infrastructure
- Versioning discipline (#106).
gengo --version,gengo_engine_version()in the C API (returns bare"0.4.0", machine-parseable), version source of truth inbuild.zig, stability policy in the README, tagging workflow in CONTRIBUTING. - The docs build themselves. docs.gengoscript.org is generated by a Gengoscript script (tools/site-builder) — every docs deploy is an end-to-end test of the language. This release it was rewritten around structs, templates, multiline strings, and multi-value returns, and the dogfooding surfaced three engine issues (#109, #110, #111) now slated for v0.5.0.
- New native capability test lane; bench and heap tests join the CI gates.
Full changelog: CHANGELOG.md · v0.3.1...v0.4.0
v0.3.1
Language
Predicate subtypes
Named types may include a predicate function evaluated at construction time:
type Port int predicate func(x) { return x >= 1 && x <= 65535 }
p := Port(80) // ok
p2 := Port(0) // PredicateViolation
The predicate compiles as a closure and may capture variables from the enclosing scope.
Variant records with shared fields
Variants may declare bare fields in their body alongside arm declarations. Shared fields are present on every value and accessible without a match:
type Shape variant {
x float,
y float,
circle { radius float },
rect { width float, height float },
point
}
s := Shape.circle { x: 1.0, y: 2.0, radius: 5.0 }
std.io.println(s.x) // no match needed
Multi-field variant arms
Variant arms may carry a struct-like payload bound in pattern matching:
switch s {
case .circle(f) { std.io.println(f.radius) }
case .rect(f) { std.io.println(f.width, f.height) }
}
Embedding
Host-defined module registration
Hosts can register named modules callable from scripts:
engine_register_module(handle, "@module:mylib", funcs, func_count);Scripts import with import("@module:mylib").
Host ABI v2
Five new host dispatch IDs for std.conv.* and std.core.bytelen. ABI version bumped to 2; capability bits guard the new calls with fallback to embedded implementations.
Native shared library
New build targets produce libgengo-engine.so / .dylib / .dll with the same C API as gengo-engine.wasm:
zig build -Dpreset=dev engine-nativeValueWire arrays and maps
engine_call results may now return arrays and maps across the boundary as ValueWire tag 4 (array) and 5 (map).
TypeScript SDK
sdk/typescript/ wraps gengo-engine.wasm with typed GVal encoding and a GengoEngine class.
Runtime
fix: predicate closure GC
Predicate closures on named types were being collected during long loops. The named_type GC mark path now traces the predicate field.
fix: Windows CLI cross-compile
Two type mismatches in the CreateFileA extern declaration caused the Windows release build to fail in v0.3.0. Fixed by declaring the path buffer as a sentinel-terminated array and hTemplateFile as optional.
REPL
- Auto-print top-level expression results in interactive sessions
- Typed redeclaration detection for globals
- Error display includes source snippet and caret
Platform
- Windows native CLI (
x86_64-windows, no-libc) std.time.sleepremoved
Conformance
146 pass-cases · 133 fail-cases
v0.2.0
Full Changelog: v0.0.1-pre1...v0.2.0
v0.0.1-pre1
Full Changelog: https://github.com/gengoscript/gengo/commits/v0.0.1-pre1