Skip to main content
Added
- Types can now be nested under an owning type and referenced by a qualified path such as
GitHub.Repo or Process.ExitSignal, with support for generics, implementations, extensions, aliases, and Debug output.
- Processes now form a lifecycle hierarchy, so exiting a parent automatically stops all of its descendants and prevents orphaned processes from accumulating.
Process.monitor(pid) watches another process and delivers a Process.ExitSignal describing which process exited and why.
Process.demonitor(ref) cancels an active process monitor.
- Calling
Process.monitor now requires the process message type to accept Process.ExitSignal.
Process.parent() returns the pid of the process that spawned the caller, or Option.None for the entry process.
priv can now hide top-level struct, enum, const, type, and protocol declarations from other packages.
- Public declarations can no longer expose private types in their signatures.
- Private declarations can no longer use
@doc because they do not appear in generated documentation.
koja shell now tab-completes keywords, types, functions, session variables, type members, methods, and fields.
- The new auto-imported
URI type parses and validates RFC 3986 URIs, converts them back to strings, and percent-encodes or decodes text.
koja.toml now accepts a bin field under [project] for naming the output binary independently of the package name, defaulting to the lowercase package name when omitted.
- The
[project] table now accepts authors, description, and license metadata.
- A boolean expression can now continue on the next line when that line starts with
and or or.
Changed
- Breaking change. Several standard library types now live under their owning type instead of being auto-imported, including
Process.Priority, Process.StopReason, Process.ExitReason, Process.Step, Process.CallError, Process.Lifecycle, IO.Ready, File.Mode, Net.Socket.Kind, Net.Socket.Address, Net.Socket.Error, Net.TCPServer.Config, Net.TCPServer.Msg, and Net.TCPServer.Event.
- Breaking change. Integer arithmetic now panics on overflow, division by zero, and
MIN / -1 instead of wrapping or producing platform-dependent results.
- Breaking change.
Float and Float32 operations now panic when they would produce NaN or infinity.
- Breaking change.
bsl and bsr now panic when the shift count is negative or at least the receiver’s bit width.
- Breaking change.
Float.to_float32 now returns Result<Float32, NumericConversionError> and reports OutOfRange when the value is too large for a 32-bit float.
- Breaking change.
String.to_cstring and CString.to_string now return Result<_, CString.ConversionError> and reject interior NUL bytes, invalid pointer metadata, and invalid UTF-8.
- Breaking change.
Binary.to_string now reports invalid UTF-8 as String.ConversionError.InvalidUTF8, and the unchecked CPtr.to_string conversion has been removed.
- Breaking change.
Binary.ptr has been replaced by CPtr.borrow(bytes) for statement-scoped access and CPtr.copy(bytes) for an owned copy.
- Breaking change. File and UDP byte APIs now use
Binary, with File.read_binary for binary reads, Binary | String accepted by file and UDP writes, and Binary returned by UDP receives.
- Panics in spawned processes are now contained to the process that crashed, while a panic in the main process still exits the program with a nonzero status.
and and or now short-circuit from left to right, so the right-hand expression is skipped when the result is already determined.
ReplyTo.send now returns ReplyTo.Delivery.Delivered or ReplyTo.Delivery.Expired to indicate whether the caller was still waiting, and handlers may ignore this advisory result.
.print() and Debug now include the full type path when rendering structs and enum variants, such as Shape.Circle and Process.StopReason.Normal.
- Float literals that are too large for a 64-bit float are now rejected at compile time.
- NaN or infinity returned by an
@extern "C" call now panics at the call site.
- Parse errors now describe tokens as they appear in source (
expected `)`, found end of file) instead of internal compiler names (expected RParen, found EndOfFile).
koja format now keeps a # comment attached to the declaration below it in package files.
koja format now wraps long if, unless, and while conditions with operators at the start of each continuation line and a blank line before the body.
koja format now gives wrapped binary expressions additional indentation so they remain visually distinct from sibling statements.
- The internal
ExitStatus protocol is no longer exposed through the public Global API.
Fixed
String equality, matching, indexing, slicing, length, parsing, and UDP sends now handle the complete string, including embedded NUL bytes.
- Comparison, division, and modulo now produce correct results for
UInt64 values above Int.max.
- Negative process timeouts and delayed sends now behave as zero instead of becoming extremely long waits in compiled programs.
- Enum matches with partial payload patterns now report the uncovered outer variant at compile time instead of reaching an unreachable runtime path.
- Generic call arguments such as
Option.None and Result.Err now infer missing type parameters from the call’s enclosing expected return type.
koja shell now loads project files when launched inside a project directory.
koja shell now prints results consistently with .print(), including named struct fields, enum variant names, and quoted strings.
- Negative
CPtr.alloc and CPtr.to_binary counts now consistently panic.