Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 01:17
· 362 commits to main since this release
v0.10.0
75e14a2

Hew 0.10.0

Hew 0.10 brings actor memory budgets, recovery from stack exhaustion, persistent
native authoring and more reliable distributed services. It continues edition 2026. Rebuild native modules and bindings with the matching compiler, runtime
and headers.

Actor memory budgets and persistent authoring

#[max_heap(...)] accounts for managed values retained by an actor, including
state, collections, message payloads and supported suspended work. Shared
immutable backing is charged once per retaining actor. Admission reserves
capacity before publishing values; cancellation retains charges until cleanup
releases them. Exceeding the budget follows supervised HeapExceeded recovery.
The budget does not include allocator bookkeeping or operating-system resources.

Recovered fault messages follow the actor's memory budget and cleanup. When
there is insufficient space for the message, scope recovery proceeds with empty
diagnostic text.

The Linux x86_64 SDK includes experimental persistent native authoring through
hew tool live. Declarations and bindings persist, initializers execute once,
and checked submissions retain ordinary ownership and cleanup. Prepared
components expose typed asynchronous services and explicit replacement. The
0.10 live tools guide describes setup and limitations;
other platform archives retain the ordinary compiler tools.

hew eval --lines compiles one body and runs it for each input line. std.cache
adds a keyed cache with optional capacity and TTL, and independent
std.random.Rng values share the same Hew implementation on native and browser
targets. See the first candidate's examples.

Recover from stack exhaustion

Native stack exhaustion follows Hew's failure and supervision path. Supervised
children can restart after a StackOverflow; cleanup retains a reserved portion
of the stack. Unsupervised failures still terminate with a diagnostic. Actor
memory limits and stack limits remain distinct contracts.

Supervised children restart immediately unless a backoff is declared. The
default maximum backoff is 30 seconds and cannot fall below the initial delay.
A child can override its supervisor's delay with its own backoff: clause or
use restart.immediate() to disable the delay for that child.

Cleanup keeps its stack reserve when execution crosses a loaded code image.
Generator wake notifications and ordinary indirect-enum cleanup traverse deep
chains without adding one native stack frame per link. Indirect enums whose
cleanup runs user code retain their declared cleanup order, and queued cleanup
keeps the originating code image alive until its callback finishes.

Scheduler workers bind to the runtime that created them, including workers that
start after that runtime begins shutting down.

When default shutdown handles a termination signal, root TCP and WebSocket
listeners exit through normal cleanup, including a process-main TCP accept that
is already parked. Cancelled child tasks drain without turning an otherwise
clean shutdown into failure; actual cleanup faults still produce a nonzero exit.

Compile long expressions and preserve receiver effects

Long method, field and index chains pass through the compiler without recursive
destruction of each AST or HIR link. Native compilation and browser WebAssembly
compilation share the checked receiver-lowering path. Excessively nested prefix
expressions receive a nesting diagnostic, and malformed legacy path expressions
produce bounded diagnostics rather than overflowing the parser stack.

Very long flat binary expressions and or-patterns can still fail in the browser
compiler. These remaining large-input cases are being fixed for 0.11.

Method receivers are evaluated once. Chained expect calls preserve stream
progress, RNG state and ownership instead of repeating the receiver's effects.
Read-only collection lookups with computed arithmetic or indexed keys avoid
unnecessary receiver snapshots. Later arguments that can mutate the receiver
still preserve its earlier value, and faults retain ordinary cleanup.

More predictable codecs and compiler behaviour

JSON float formatting round-trips the represented value. Typed JSON decoding
refuses numbers outside the f64 range; underflow still rounds to zero. JSON,
MessagePack and typed wire decoding share a nesting limit of 127. YAML limits
expanded nodes rather than imposing fixed anchor and alias counts. XML preserves
escaped whitespace and refuses invalid element and attribute names. CBOR and YAML
duplicate-key detection compares nested maps independently of field order.
Recursive YAML aliases are rejected before expanded values are retained.

Compiler and standard-library fuzzing now exercise additional native and sandbox
paths. Recovered cases cover parser progress, numeric boundaries, borrowed
encoding values and formatting stability. These checks complement ordinary
source execution and sanitizer coverage.

Keep distributed grants across connection replacement

Authenticated peers that support service sessions retain an imported service
grant when its acknowledgement is lost and a connection is replaced. Resending
the offer acknowledges the existing import without delivering the grant twice.
Closing a grant retracts it, and stopping a node settles its own outstanding
offers and receives without cancelling another node's waits.

Import deduplication history is bounded. At capacity, a new import reports
WorkerAtCapacity while preserving queued offers and pending receives;
duplicates can still be acknowledged. Retraction or issuer-session replacement
frees capacity. Legacy peers keep their connection-scoped behaviour; the optional
capability uses the existing version 12 protocol.

Graceful node shutdown sends a bounded, best-effort authenticated LEFT
notification before closing peer I/O. QUIC finishes its departure stream and
waits for acknowledgement within that shutdown window. Crash detection continues to
report DEAD; shutdown does not guarantee delivery to every peer.

Persistent tools and runtime efficiency

Live source sessions retain their frontend context. Observe can inspect multiple
process identities. Compiler work reuses settled facts, while coroutine frame
reuse, request allocation changes and scheduler work reduce repeated runtime
costs. These improvements preserve the language's ownership and cancellation
contracts; they are not a promise of a fixed speedup for every application.

Rebuild native modules and bindings with the matching compiler, headers and
runtime. First-class failure traces and the expanded debugging API are planned
for 0.11 and are not part of 0.10.0.

Native compatibility repairs cover scalar vector-push code generation,
Windows stream-error linkage and GNU Linux runtime unwinding. Compiler diagnostics
also retain file identity when macOS presents a temporary path through
/private/var. Windows static-library, DLL and debugger outputs use distinct linker paths,
so concurrent builds preserve the runtime archive and matching symbols.

Linux distribution packages install the C driver and system development files
needed to link native programs. Shell-installer and tarball users can follow the
native build prerequisites.
Project creation hints name the directory to enter before checking or running.