Memory lives in regions the compiler infers, so a program carries no lifetime annotations. Allocation goes through arenas by default. A region moves between tasks instead of being shared, which is what keeps concurrent access safe, and the aliasing that falls out of that is information the optimizer gets to use. Arithmetic is checked in every profile, including release.
fn fill(n: int) -> List[int] {
var xs = List[int]() // lands in the caller's current region
for i in 0..n { (mut xs).push(i) }
xs
}
fn main() -> !int {
var total = 0
region tmp {
let xs = fill(100) // allocated in tmp [mem.region.create.3]
for x in xs { total += x }
} // wholesale free [mem.region.intra.2]
if total == 4950 { 0 } else { 1 }
}
That is corpus/memory/region_ambient_ok.lu, verbatim below its
header. The callee allocates into the caller's region, so the list lives in
tmp and dies with it, and the bracketed names in the comments are
the specification clauses the program is pinned to.
Run it in the browser, along with thirty-odd other
programs from the same corpus.
What runs today
v0.2.41 is tagged, still under the codename wolfgang. wolf
build and wolf run compile .lu source to
native machine code through the compiler's own backend, with no LLVM in the
loop. wolf build --release emits textual LLVM IR and hands it
to the system clang — no LLVM libraries linked, no new dependencies. Both
tiers produce the same verdict and the same output on every corpus program
they both execute, and CI holds a floor under how many that is, so the
comparison cannot quietly shrink to nothing. A binary never claims a release
it is not: wolf --version built anywhere but the tag answers
with the build's commit.
match is the switch you were reaching for.
In statement position it is what a reader from any C-family language expects,
and the arm that was missing is there:
match n {
0 => ...,
1 | 2 => ...,
3..=9 => ...,
n if n % 2 == 0 => ...,
_ => ...,
}
lo..hi and lo..=hi, over integer and
char literals, in any pattern position, composed with
|, with guards and with @. Both ends are literals:
no identifiers, no expressions, and no open ends, because ..hi
and lo.. are how a slice is spelled — and a parser that refuses
one now says the word "range" instead of leaving you to work out which of the
two you had written. A range no value can match is E0815 before
the program runs. Exhaustiveness computes no union, so a _ or a
binder arm is still required after range arms, and when one is missing the
diagnostic names the first value nothing covers. The guarded arm in that
chain is new as well. Native lowering used to refuse n if n % 2 ==
0 => standing before a _ — as conservatism, while the
checked machine and the interpreter both ran it — and the refusal named the
wrong arm. It lowers on both tiers now, and the switch above is
byte-identical on both.
And the compiler stopped blaming itself for your program.
s[l-1..l] = "{t}", which is a reasonable thing to try when you
want to change the last character of a string, was answered cannot
compile this yet and a pointer at the ledger of things the backend has
not got to. That was backwards. A str never changes after it is
built and a slice of one is a view, so there is no place on the left of that
=, today or ever. [mem.str.imm] rules it and
E0416 says it — cannot assign through a str slice: s
is immutable — with the three spellings that do work in the note.
A send in a loop body is a warning, not a mismatch.
chan.send is typed () ! {closed, cancelled} now,
which is the row [conc.chan.close] had always described, and
typing it raised a question: what does a fallible () mean where
() is expected? [type.unit] answers it. The body of
a loop, an else-less if and a unit function are unit contexts,
and a !() tail in one is a warned discard — W0601 — never an
error. ch.send(v)? hands the failure to the enclosing scope and
else handles it on the spot; the corpus spells the first. A task
closure's tail is the one different case, and the clause says why: the scope
consumes it and re-raises the row when it exits.
Around those three, that release was the language reading what a signature
already said. A body's tail is checked against the declared result
([type.fn.ret], E0401 at the tail rather than somewhere
downstream of it), and a !T is two values that no operator reads
([type.row.operand], E0409 on either side). Nothing moved in the
compiler for either one: both rules were being enforced and neither was
written down, and lupin enforces both. Two more, for anyone who
records a number: a module's interface hash is over the interface alone, so a
toolchain bump no longer moves every hash in the file; and the commit in a
development build's version string is seven characters by decision, from
every clone, rather than whatever the object count makes git rev-parse
--short guess.
The release this page advertises lets a program adopt the
orphans of its children and reap them, give a connection attempt a time
budget, and refuses a select that a cancellation could
leave with nowhere to go. os_subreaper_set
marks the process a child subreaper and os_subreaper reads
the mark, so an orphaned descendant goes to the program instead of to
process 1, and os_wait_adopted_poll reaps each one the
process table does not hold without touching a child it does; Linux
answers all three, and macOS and windows answer
unsupported (wolf-lang#1153).
net_connect_within dials as net_connect does
under one budget for every address a name resolves to, and answers
timeout when the budget is spent (wolf-lang#1146). Programs
that read freed memory or lost a write are refused now: a
? that carries an error payload built inside a
region block out of it (E1010), a write to a closure
parameter declared without a mode (E1014), and a select
that can block with no timeout arm in a function whose
signature has no row for cancelled (E0604, or E0602 where a
declared row lacks it). A join returns only once its proc has exited,
and a proc that dies by a kill or a contained trap first ends every proc
it still owes, before its own regions free. A float cast to a narrow
integer no longer stops the x86-64 compiler with an internal error.
Builds place functions by module and name, so a program's bytes no
longer depend on the order the compiler's workers finish, and
--cold-function moves the functions a program names out of
the way of the rest. wolf fmt keeps a one-armed
then guard on one line. The std/ in the
archive adds Bech32, strict raw base64, a guarded OS random source, a
byte comparison that takes the same time for every input, and
std.poll on the previous release's one wait. The
interpreter tested beside this release gets the specification's answer
for programs it used to answer wrongly without a word, and does not
resolve this release's new calls: the
playground measures the difference.
v0.2.40 gave a program one wait over files, sockets and
signals, and the answer for every ready entry.
os_wait_ready takes file and socket handles together, a
signal set and a deadline, and answers every element that is ready with
what it is ready for; a readiness set the kernel holds
(os_ready_open, os_ready_set,
os_ready_wait, os_ready_close) answers in the
kernel's order, through epoll on Linux and kqueue on macOS, and a
handle's close removes it from every set. net_write_some
sends once and answers how much the host took, never parking, and
net_peer_cred answers a Unix-domain peer's process, user and
group. Its std/ wrapped the previous release's sessions and
pseudo-terminals.
v0.2.39 gave a program sessions and pseudo-terminals, and wrote
down what the front end does where the specification had been
silent. os_spawn_session starts a child that leads a
session of its own, os_setsid moves the process into one and
os_sid reads it; os_term_open_pty opens a
pseudo-terminal pair; its size is set with os_term_set_size
and each of its settings by the RFC 4254 opcode a remote shell sends. A literal pattern its
scrutinee's type cannot hold is E0415, a name bound twice in one pattern
or a parameter declared twice is E0827, the alternatives of an
or-pattern bind the same names (E0828), a type that holds itself by
value is E0404, and a name a match arm or a for
header binds cannot be assigned (E0410). A
capitalized name nothing declares is E0301 at the name, where the
compiler used to blame itself, min compiles on every tier,
and on Linux wolf build names the lld it links with.
v0.2.38 described wolf's types to a debugger, and found a
map's keys by hashing. With -g, structures, lists,
maps, enums and error unions reach gdb and lldb as what they are, and the
call frames a debugger unwinds with are written too. A Map
keeps a hashed index over its entries, so 100,000 string inserts and
lookups that took 16.0 s natively on x86-64 Linux take 0.020 s. A bare variant inside a payload pattern tests that variant on
every tier, a let that binds a name spelling a variant warns
(W0801), and a select arm that spells one is refused
(E0806).
v0.2.37 let a program work relative to a directory it holds,
and gave a coreutils written in wolf the calls it had asked
for. fs_open_at, fs_stat_at,
fs_remove_at, fs_create_dir_at,
fs_symlink_at, fs_link_at and
fs_read_dir_entries_at look a name up in a directory handle,
whatever its path has become, so a walk cannot be carried out of its tree
by a swapped symbolic link; fs_statfs,
os_chroot, os_getpriority,
os_setpriority and os_signal_action_one serve
df, chroot, nice and
env. A plain push of a heap value into a list that outlives
its region block is E1010, and long builds report their
progress on a terminal.
v0.2.36 let a program call into C with a variable argument
list and be called that way, and read the name it was started by and its
arguments byte for byte.
VaList and its four operations, va_start,
va_arg, va_copy and va_end, join the
prelude: a hand-declared C call and an exported variadic definition work on
hosted linux x86-64 and the freestanding x86_64-unknown-none
target, on the native and release tiers, the way the SysV calling convention
lays them out; other targets refuse both by name (E0826), and so does the
checked machine. env_arg0() answers the name a program was
started by and env_args_bytes() every argument as bytes,
argv[0] first, and a text argument that is not UTF-8 now traps
by its index (argument-utf8) where it used to abort. A program
linked statically against musl reads its arguments too, because the entry
the compiler emits hands argc, argv and the
environment to the runtime. Programs start about as fast as they did at
v0.2.34 again; every spawn and a failed os_exec carry the
host's error number; --linker and --assembler
choose the tools by path; and the release publishes the musl runtime beside
its four host archives. The std/ in the archive moved on to
wrap the previous release's calls — fs.access,
fs.lock, fs.read_into,
process.core_limit among them — and its list helpers now change
a list in place. The interpreter tested beside it, lupin 0.1.58,
moved its specification pin to a development revision short of that
release, ran the previous release's region and list programs, though not
yet its new calls or that release's own, and recognized a variadic
declaration while refusing to run one by name, as the checked machine
does.
v0.2.35 compiled the enums whose payloads disagree, gave a loop a
region for each turn, and named a stack overflow. An enum such as
enum Value { Int(int), Text(str) } builds natively and on the
release tier, each conflicting payload slot a union sized for its largest
member, which is what std.json needed. A region
block can write a scalar or an explicit copy into an outer
value without keeping the block's data, and List.reserve and
List.reset keep a buffer across turns. A main-thread stack
overflow reports wolf-trap: stack-overflow and exits 134
where it used to die without a word. A member read on an unhandled
!T is E0409 at the base, and the note spells the two ways to
handle it. A program gained the filesystem calls a shell and an editor ask
for — fs_access, fs_lock,
fs_mkfifo, fs_set_nonblock, a whole
fs_fstat_record, an open that refuses a symbolic link — and
process calls for a core limit, an adopted descriptor and the names of
the operating system and the architecture; wolf test took
--nocapture. The interpreter it was tested against released
beside it without re-reading the specification, so the gap widened at that
release too.
v0.2.34 let a forked child keep
running wolf code, and gave an editor the calls it asks of the
host. os_fork answers the parent the child's
process id and a handle the waits and polls serve, and answers the child
(0, -1); the child is one thread, the caller's, with the
program's memory as it was. It answers busy, before the host
is asked, while any task is live, from a task or a proc handler, or under
the deterministic scheduler, so a fork never copies a lock another thread
holds; the checked machine and windows answer unsupported
(wolf-lang#803). An editor can have the runtime restore its terminal at
every exit the runtime owns (os_term_restore_at_exit,
wolf-lang#794), wait over several descriptors, a signal set and a
deadline at once (os_signal_wait_fds, #795), sync a file and
its directory for an atomic save (fs_sync,
fs_sync_dir, #796), resolve a canonical path
(fs_realpath, #797) and read a clock in nanoseconds
(os_clock_ns, #798). Three answers a running program can see
moved: a terminal mode's bits 5 to 7 are fields now, the raw carriage
return, raw output and stripped input, so a mode without them writes the
usual setting where the release before left each as found (#802);
wolf test runs a test file's own test_*, never
those of a plain file that sorted before it (#799); and a program that
names os_signal_wait_fds makes the signal hub and its wake
pipe before main, as one that names
os_signal_wait_fd does. The std/ in its archive
wrapped the previous release's calls —
signal.ignore_one and signal.reset_one,
process.exit_signal, and the core read beside
process.Status, never inside it — with
net.Addr beside them, and none of its own, so a program
called those as the prelude spells them. The interpreter tested beside it
had learned the previous release's calls and none of these.
v0.2.33 let a program choose for
one signal at a time, end itself by a signal, and learn that a child
dumped core. os_signal_ignore_one and
os_signal_default_one set one meaning's signal ignored, or
back to what the host does by default, in the shape the sending calls
take — a meaning only sent, such as a fault, or a host's own number as
-N — which a set cannot hold, so a program can ignore the
signal it is about to send its own group and live through it, as GNU
timeout -s SEGV does; 0, KILL and
STOP are invalid (wolf-lang#783).
os_exit_signal ends the process by a signal, so that its
parent reads the end as that signal's and a shell reports 128 +
N, and exits with 128 + N if the process lives on
(wolf-lang#784). os_wait_status_core and
os_wait_poll_core are the wait and the poll of the children
again, with an end that dumped core answered -(256 + N); the
wait and the poll a program already calls still answer -N,
core or not, so code that compares a status with -N reads
what it read before (wolf-lang#785). Three answers a running program can
see moved: os_signal_text(0) gives the host's words where it
answered invalid (wolf-lang#787); a SEGV or BUS another
process sends ends the program under the default disposition, where a
program that had run a task lived through the first one, while a real
fault is still the runtime's own (wolf-lang#784); and a program that names
os_signal_wait_fd starts with two more descriptors, one wake
pipe every descriptor wait shares, made before main
(wolf-lang#781). The std/ in the archive moved on to wrap the
group sends, the poll and a signal's numbers and words:
process.poll and process.Status,
process.Group with lead_group and
join_group, and signal.send_group,
signal.send_all, signal.last,
signal.realtime, signal.text and
signal.host. It wraps none of that release's new calls, so a
program calls them as the prelude spells them. The interpreter tested
beside that release did not know its new names; the one beside the
release above answers their shapes and the core siblings, and refuses the
rest by name.
v0.2.32 kept a closed standard
descriptor closed, and let the checked machine's waits and writes make
way for the tasks they wait on. At v0.2.31 a program on the dev
tier, wolf build and wolf run, that imported
std.signal or std.net and was started with
descriptor 0, 1 or 2 closed found it open before main: the
runtime made its signal hub or its readiness set at start, the host put
their pipes on the lowest free numbers, and a program run
prog >&- wrote its output into the runtime's pipe where
it should have failed (wolf-lang#778). The runtime's own descriptors have
never taken 0, 1 or 2 since, on either tier, so a standard descriptor the
program was started without stays closed, and the hub and the set are made
only where a program reaches a call that needs one: an import alone makes
nothing. On the checked machine, wolf conform-run --checked,
net_wait beside other tasks waits a millisecond at a time and
lets them run, so a loop waiting on connections from tasks it spawned
answers instead of hanging, and a socket write too large for the buffers
does the same beside the task that will read it (wolf-lang#720, #777).
It added no call and no prelude name, and the archive's std/
and the interpreter it was tested against were those of the release
before it.
v0.2.31 made a shift arithmetic, refused to start a program
the runtime could not set up, and let a shell wait for its jobs. A shift on a plain integer is arithmetic on
its value ([type.int.shift], wolf-lang#736): x <<
n is x times two to the n and traps
overflow when that leaves the type, x >> n
is the floor of x over two to the n, and a
negative count traps. Native and release had computed the machine's masked
shift, so 255 << 1 at u8 printed 254;
wrapping[T] keeps those bits for code that wants them, and
the checked machine answers a plain shift it had refused by name. A
program that names a call which can park in the reactor, or listens or
waits for a signal, has its readiness set or its signal hub made before
main, and when the host refuses one, at a descriptor limit
already reached at start, the program does not start: one line on stderr
and exit 71, where it had run and ended with SIGABRT at its
first park or listen. os_wait_poll asks, without blocking,
whether a child the program started has ended or stopped, and reports a
stop as 256 + N beside an exit code and -N for
an end by signal N; os_signal_wait stopped waking on a timer,
so an idle wait makes no context switch at all (wolf-lang#680).
os_signal_send_group and os_signal_send_all
reach a process group and every process, os_set_pgid moves
the caller into a group, the sends take a host's own signal number as
-N, os_signal_last and
os_signal_realtime say how far the host's numbers go, and
os_signal_text gives a signal's words: what kill
0, kill -1, kill %job and kill
-l are made of (wolf-lang#739, #740, #741, #762). The
std/ in that archive had moved on to wrap the release before
it: env.uid and the other id reads,
fs.set_owner, process.set_ids,
term.size, term.chars and
signal.wait_fd, with std.os.users to read the
user and group files; it wrapped none of that release's new calls. The
interpreter it was tested against, the one the two releases after it
were tested against too, mirrors the shift rule, answers the poll with no
child left and the shape rows of the group calls, refuses each
well-formed group call by name, and had released without re-reading the
specification, so the gap widened at that release too.
v0.2.30 fixed a crash in the compiled tiers, and told a
program who it runs as and what its terminal is. The release
before it panicked in wolf build
and wolf run, on native and on release, at a function with
no branch, loop, call or index that declared a local, then compared two
strs, narrowed or changed the sign of an integer with
as, turned an int into a char or
took a signed wrapping / or % by a divisor that
is not a constant, and then read the local (wolf-lang#755). The checked
machine and lupin always answered those programs, and every
compiled tier did from then on. A
function that spawns a proc handed a parameter's bytes, or its caller's
region, must meet that proc on every path out — p.join(), an
exit received from p.monitor(), or p handed to a
function that does so — and every call to one that may leave it running
became E1010 at the argument a region block would free under
it (wolf-lang#678), where native and release had printed the bytes the
next region put there. os_term_size
reads the window's rows and columns, os_term_chars the
user's erase, kill and interrupt keys and the rest, and
os_signal_wait_fd is one wait that a key and a signal both
end, which is what a line editor asks of its terminal (wolf-lang#719); a
terminal mode gained FLOW and EXTENDED.
os_uid, os_euid, os_gid,
os_egid and os_groups say who the process runs
as, fs_set_owner and fs_set_owner_fd change a
file's owner, and os_set_ids becomes another user for good:
it returns with every id as asked or every id as it was, and ends the
process rather than leave it in between (wolf-lang#633, #701, #742).
linux serves the drop and macOS answers unsupported for it;
windows answers unsupported for every one of these calls.
The interpreter it was tested against served the owner calls, refused the
id reads, the drop and the terminal calls by name, and released without
re-reading the specification, so the gap widened at that release too.
v0.2.29 let a server park a task for every connection, and
gave a shell the signals it is made of. A task parked in a wait — net_read,
net_accept, a channel recv, a when
or a sleep — holds a thread, and the pool adds a worker beside it. That
had stopped at a fixed number of workers a core, so a program that parked
more tasks at once stopped with them, the task that would have woken them
queued behind them (wolf-lang#713). The pool lost its cap: the host's
thread limit is the last word, and a thread the host refuses is one line
on stderr, never an abort. A parked task costs its thread and no cpu,
where every parked wait had woken many times a second to look for a
cancellation; os_signal_wait still polled then. Every signal POSIX
names gained a meaning in the signal set, the ones a program may listen
for, ignore, wait for and poll, and KILL, STOP
and the fault signals, which it may only send; a set holding a bit that
is not a listenable meaning became io at every call that
takes one, where a listen had dropped the bit and answered ok.
os_signal_ignored reads which meanings are ignored, at start
the ones the program was started ignoring; a poll stopped trailing a
delivery; os_pid and
os_ppid are this process's id and its parent's,
os_signal_send signals a process by its id, and
os_signal_number is the one way to a host's number — what
trap, kill, $$ and
$PPID are made of. A published meaning keeps its bit in every
later release ([os.signal.set.stable]), so a set a program
holds today means the same signals under the next compiler.
wolf lsp began to find the standard
library as wolf build does, where an editor had shown a false
E0301 on every std method outside the builtins
(wolf-lang#724). The std/ in that archive had been written
against the release before it and wrapped none of its new calls. The
interpreter it was tested against mirrored the calls it could serve
without unsafe and refused the send and the ignored set by
name, and released without re-reading the specification, so the gap
widened at that release too.
v0.2.28 closed two ways a program
could read freed bytes through a call, and its checked machine ran
concurrent code. A callee handed a mut argument may
keep what else it is handed in it, and a callee handed a channel may send
it on; when the bytes came from a string built in a region block, the block
freed them while the caller's list or the receiver still held them, and
native, release and the checked machine read what was left
(wolf-lang#660, #665). Both shapes became
E1010 at the call, read from the callee's signature and
never from its body, and the message names the edit that is sound there:
"{s}" inside the in block builds the bytes where
the callee allocates. It is a compile-time refusal, so no accepted program
changed and nothing costs time at run time; some programs that were
correct are refused too, and the release notes say which shapes. The
checked machine, wolf conform-run --checked, runs
scope, spawn, procs, select,
when, closures and xs.par(f) one task at a time
under a deterministic scheduler, where it had refused them by name, so the
machine that watches for undefined behaviour reaches concurrent programs. A
program can change a file as well as read one —
fs_set_mode, fs_symlink, fs_link,
fs_truncate, fs_set_times, a creation's
permission bits and os_umask, what chmod,
ln, touch and mkdir -m are made of.
A long-running server stopped growing in the runtime, and a
List slice became one copy where it was a loop of pushes.
v0.2.27 shipped the standard library
in the archive and fixed three integer answers. Every archive
carries wolf-std as std/ beside wolf, and that
copy is where use std.env resolves when nothing else is
configured. Unsigned and wrapping integers print and compute as the values
their types hold, where the compiled tiers had printed a
wrapping[u64] as signed and refused or trapped its division
(wolf-lang#551, #538, #553). A program can survive Ctrl-C, run a job in its
own process group and own the terminal; become another program with
os_exec and remove a variable; read the full stat record, a
link and a typed directory listing. A repeated json name answers its last
occurrence, a module named c links, and a C declaration needs
the ffi capability as import c does. The
interpreter it was tested against released beside it and beside v0.2.28
without re-reading the specification, so the gap between them widened at
each.
v0.2.26 fixed one more answer the
compiled tiers got wrong without a word, and handed a program its own
plumbing. A call to a function returning a str left
no record of the region it was made in, so region scratch { out =
build(7) } handed out freed bytes on the checked,
native and release tiers, where lupin trapped; that call became
an allocation site, and holding its result past the region
E1010. The way to keep a region block's result came with it:
copy region { … } runs the block, copies its value out into
the region it was entered from and frees the rest, so a loop keeps each
turn's answer and nothing else ([mem.region.copyout]). A
program's standard streams take bytes on descriptors 0, 1 and 2;
os_spawn_fds, os_pipe and os_chdir
build a pipeline, a redirection and a cd from the program's
own argv, and os_isatty asks whether a descriptor is a
terminal. -> never declares a function that never returns,
so bad => die("…") fits an arm that wants an
int; ! on an integer is its bitwise complement at
the operand's width, so x & !0xfff is the mask it looks
like; p[i].f = v stores one field through a raw pointer to a
struct; and another module's pub const reads as
m.K. A package's capabilities are what its code reaches now, a
host builtin it calls as much as a module it imports, and wolf
audit prints why each one is there. The interpreter it was tested
against released beside it without re-reading the specification, so the
two were two releases apart where they had been one.
v0.2.25 fixed three answers the
compiled tiers got wrong without a word. A store to a module
var, to extern "c" let storage or through any raw
pointer was carried across a call to a function that wrote the same memory,
so the caller read back its own stale value: the checked machine and
lupin printed 99 where native and release printed
0. Loads had the same fault, a read after such a call reusing
the value from before it. Every call now ends what the caller knew about
that memory, which [mem.static.2] says on every machine; a list
lent to the callee stays frozen for the call, as a read parameter promises,
so its loads are still reused. And on release a branch on the top half of
an unsigned shift, a >> 63 == 1, was deleted, because
the range pass bounded the shift by the signed maximum. The interpreter it
was tested against had re-read the specification at the tag before it, so
the two were one release apart where they had been two.
v0.2.24 let a kernel share a word
between cpus and allocate. On a *T whose pointee is
a fixed-width integer, inside unsafe, atomic_load,
atomic_store, atomic_swap,
atomic_add, atomic_sub, atomic_and,
atomic_or, atomic_xor and
atomic_cas each take an order
written at the call, Order.relaxed through
Order.seq_cst, and the builtin fence(o) sits
beside them. A pointee that is not an integer is E1308 and an
order the operation does not admit is E1309. On the
freestanding target List, Map, interpolation,
closures and region compile against a
wolf_alloc and wolf_free the program supplies. A
raw access at an address that is not a multiple of its pointee's alignment
is undefined, row L4, where the machines had disagreed about it. A module
string holds the bytes the same literal holds inside a function; every
compiler machine had printed its source, quotes and indentation included.
And wolf prelude --json lists every name a program gets
without an import, with the clause that defines it where one does.
v0.2.23 let a wolf kernel own its
machine. Integers and pointers convert both ways —
int as *T, *T as int, addr,
with_addr, expose and is_null — and
prefix *p reads and writes through a raw pointer on every tier,
where each was unsupported. On the freestanding target an
address no allocation owns is the platform's, so 0xb8000 as
*u16 stores to 0xb8000. p.read_volatile()
and p.write_volatile(v) are one access each, never elided,
split or merged, and a pointee that is not one fixed-width integer or
byte is E1307. #[repr(c, packed)]
and #[repr(c, align(N))] lay a struct out as C does, and
size_of, align_of and offset_of
answer at compile time, held to gcc and clang in both directions. Module
const, let and var compile as data
in the image, evaluated at compile time so there is no initialization
order to observe, and a var is raw-tier, read and written
inside unsafe. #[section(".name")] places code
and data, and extern "c" let names a symbol the link defines.
An interrupt reaches an export fn through an assembly
trampoline the manifest lists. And one wrong answer with no diagnostic
is gone: an else-less if at a fallible function's tail
handed its branch's error to the caller on every machine, unwarned, and
it is the warned discard now, as the same if one line higher
already was. Hosted programs that use none of this build byte-for-byte as
before.
v0.2.22 built for a machine with
nothing under it. wolf build --target x86_64-unknown-none
--emit=obj emits a kernel object: no main shim, no
runtime, one trap hook the program supplies, and everything that needs the
hosted runtime or an allocator refused by name before any backend runs.
Assembly sources listed in wolf.pkg are assembled and linked
beside it. The C membrane opened both ways: an export fn is a C
function, a hand-declared extern "c" fn is callable inside
unsafe, a #[repr(c)] struct stored through a raw
pointer has C's layout where the compiled tiers had packed it, and a
*T may stand in a module-private signature or cross to C, never
in a pub one. The attribute set is closed — an attribute wolf
does not know, or does not implement yet, is E0817 by name
where it used to compile and mean nothing, #[cfg(target =
"…")] is evaluated rather than ignored, and an ABI string other than
"c" is E0818. An integer cast keeps its value or
traps overflow: native and release had reinterpreted the bits,
so -1 as u64 printed -1, and the bits are spelled
v as wrapping[u64] since. A for piece cannot outlive
its region, where the compiled tiers printed it from freed bytes. And a
program can seek, tell and read at an offset, with the process's standard
streams on the descriptors C gives them, which is what a tail
that does not read the whole file needs.
v0.2.21 let a match take
a fallible value apart. match look(m, k) { none => -1,
v => v } is the shape a reader reaches for when a function answers
int ! {none}, and through v0.2.20 every tier of the compiler
answered it unsupported while the interpreter ran it.
[type.row.match] rules it now: an arm naming a tag of the
scrutinee's row handles the error half, any other pattern handles the value
half, the match must cover both, and a tag that is also a variant of the
value's own type is E0816 rather than a guess. The same release
closed three places where a program compiled and answered wrongly without a
word. A ? inside a defer or an
errdefer is refused, E0611
([type.row.defer]): the checked machine dropped the error it
raised and the native tiers overflowed the compiler's stack on it. A
block's errdefer runs when the block's own value is an error,
as a function's does, where the native tiers ran its defer
alone. And a literal written at a binding with no annotation takes
i32 there, so let big = 5000000000 is
E0415 on every tier — a later int use used to
widen it after the fact, which lupin never did. Release builds of one program by one compiler are
byte-identical again.
v0.2.20 made arguments
two-phase. Within one call a later argument may read what an
earlier mut argument claims — grow(mut xs, xs.len)
runs — and may not write, move, re-claim or lend it, a mut
receiver included ([mem.tier0.excl.4]). Programs that wrote a
claimed place inside a later argument had answered wrongly, some of them
differently on different tiers, and are E1002 now. Two claims in one call reach two
elements through an offset or a loop index the compiler can prove distinct,
add2(mut xs[i], mut xs[i + 1]); a struct field's shorthand
W { xs } is exactly its longhand and moves xs; an
else handles its scrutinee's own row and nothing outside it
([type.row.else]); and a program that inherited a signal
blocked hears the signals it arms.
v0.2.19 let two mut claims reach two elements of
one list.
swap(mut xs[0], mut xs[1]) is the shape a reader writes first,
and through v0.2.18 every tier of the compiler refused it while the
interpreter ran it: a claim on an element was a claim on the whole
container. [mem.model.place.elem] already said which elements
are distinct places for a move, and the rules that ask whether two claims
meet — exclusivity, borrows and iteration — read it now too. Two
integer-literal indices with different values hold two claims that cannot
meet, whether the call is add2(mut xs[0], mut xs[1]), a grid's
add2(mut g[0][1], mut g[1][0]), a field below each element, a
loan of one element beside a store to the other, or a loop over one element
that pushes into the other. A run-time index, the same literal twice and a
path beside its own prefix are still one place, and still refused.
The same clause answers two questions a claim raised. An element and its
container's length are different places under a claim as under a move, so
bump(mut xs[0], xs.len) runs; and a container's header is read
by len, count and is_empty and by
nothing else, so each is allowed beside a moved or claimed element, while
push, get, pop, a slice and a
method's self read the whole container and stay refused beside
a moved part. And that release fixed a defect v0.2.18 shipped: two
mut fields off one mut parameter,
add2(mut r.a, mut r.b), stopped its release tier with an
internal compiler error once the call was inlined. The element pairs above
reach the same shape, which is how it was found; such a call stays out of
line now and prints the same bytes on every tier.
v0.2.18 was a point release, and it existed to refuse two
programs v0.2.17 compiled and answered wrongly without a word.
Both read a value that had already been moved away. In the
first, an element is moved out of a list, a different element is
stored into, and the moved one is read: v0.2.17 let the store to the
sibling bring the moved element back, so the checked machine trapped at the
read while the native tiers printed the moved list through the container —
one buffer under two names. A store brings back only the element it names
now. In the second, a function moves out of a mut parameter and
returns without putting a value back, and the caller went on reading the
buffer the callee had moved away and grown. A mut parameter is
initialized at every return of the function now
([mem.tier0.mode.mut]), so storing a value back before each
return keeps it legal, and both shapes are E1001 on every tier
of the compiler. They were reading a moved value on every machine that ran
them, so nothing that was right stops compiling.
The rule the first refusal stands on was new text at v0.2.18,
[mem.model.place.elem]: which elements of a container are
distinct places. Two integer-literal indices with different values are, and
so are two literal Map keys and an element against its
container's len — so move xs[0] leaves
xs[1] readable, where every earlier release refused the read,
and a diagnostic names xs[0] where it used to print
xs[_]. A run-time index is still one place with every other
index, with one exception, the shape a reader writes most: take a value out
through m[k], work on it, store it back through the same
k with k unwritten between, and it is yours again,
for a key of any copyable type, a str included. And a store
evaluates its place's own operands before its right-hand side —
xs[idx()] = val() calls idx first — which the
native tiers and the interpreter already did and the checked machine does
now.
v0.2.17 gave back what v0.2.16 took away. v0.2.16 taught the compiler that a container element
is a place a mut argument can claim, and the check that came
with it refused programs every earlier release and the interpreter ran: call
a function with mut lg in both arms of an
if/else, call it again after the join, and the
second call was refused, naming an arm that had already finished as though
it were inside the call. It was the shape the exit convention prescribes,
so it was everywhere — the web server and the coreutils this project is
writing in wolf both carried workarounds for it rather than stay off that
release. The rule was
right and the walk was wrong: the check read block numbers as if they were
program order, and a branch mints its join before its arms. It has read the
call's own arguments since, the workarounds have come out, and the refusals the
rule was written for are all still refused.
That release also fixed the defect v0.2.16 named on its way out. A function that takes a scope handle as a parameter and spawns into it never returned on the native tier: the task's captured state lived in the frame of a function that returns before the scope it spawned into joins. The runtime copies that state into the scope at the spawn now, and the program answers in under a second where it used to hang; a task spawned in a loop through such a handle is still refused by name rather than compiled. It survived every gate for a reason worth a reader's attention — the debug build of the compiler does not show it, and everything that runs on a developer's machine is a debug build.
Beside those two, v0.2.17 landed the rulings taken the week it was
cut. An
index store follows push: xs[i] = v and
m[k] = v copy the value in and leave v yours, and
xs[i] = take v is how you hand it over instead. A store works
out its right-hand side before it decides where the value goes, so a
right-hand side that grows the list it is storing into cannot leave the
store aimed at memory the list has already left. And a diagnostic that
points into a sibling module now says which file it is in, where the
record used to give an offset into the wrong one without a word.
v0.2.16 was the second release in this project's history to
change what a program you already wrote means. The first changed
what a program printed; that one changed what the toolchain exits with. A
program the compiler rejects exits 2, and one it refuses as outside
what it implements exits 4, where both used to be 1 — and 1 is what a
program that ran and returned an error out of main
exits with, so a harness reading exit 1 could not tell a build
failure from a program's own answer. [conf.exit] separates
them. The same release fixed four programs v0.2.15 got wrong without a word
— among them a move out of a copyable place that recorded no
move at all, so reading the place afterwards printed the value that had just
been moved away, on every tier. That one was found by a reader working
through the book's chapter on ownership, which is
the best argument this project has for writing the book at all.
v0.2.15 grew a surface, and it is the one the
playground has the most to say about. A method call is
defined as the function it is — xs.map(f) is
list.map(xs, f), resolved in the receiver's own module — and
the set of combinators is closed: ten functions, plus one builtin that is
not a function at all. xs.par(f) maps over a list in parallel
by opening a scope full of spawned tasks between its own parentheses, hands
results back in input order, and its cost clause refuses to promise a
speedup: a list shorter than the worker count, or an f cheaper
than a spawn, makes it slower than the serial version, and both are
conforming. The book's section on it measures its
own word counter on eighteen cores and prints the row where parallelizing
made the program slower first, which is the honest order. That release also
made handing a non-Copy value to a builtin container
copy the element in, where it used to leave the caller's
handle alive inside the container with nothing spelled at the call; before
it, v0.2.13 was three spellings the language could not write at all: the
list literal, range[int] and range[char] as types,
and error IoErrors = {none, parse, io} as a name for a row.
What the tab can and cannot do with any of them is measured on the
playground.
There is a second implementation. lupin is a reference
interpreter written against the same specification, sharing no code with the
compiler; the two are compared program by program through a published
observation protocol. Neither is allowed to disagree with the other in
silence. wolf --version names the lupin release the compiler was
differentially tested against, and since v0.2.7 a CI job fetches that lupin
by digest and runs the comparison on a runner, so the line cannot go stale
somewhere only a laptop would notice. The playground on this site runs that
interpreter, compiled to WebAssembly.
The performance goal the project set for itself, beating naive
clang -O3 across a kernel suite, was declared met on
2026-08-24: three consecutive nightly runs of the benchmark ritual held the
suite geometric mean above that baseline — 1.099, 1.066, 1.080 — with two
documented exceptions renounced in writing. The suite once measured 0.191 of
the same baseline, and the measurements that refuted the goal along the way
still ship with the code, beside the protocol for reproducing all of
them.
There are no macros; compile-time evaluation and reflection are the metaprogramming tier. Packages are declarative — reading a dependency graph never executes anything — and there is no hosted registry.
Getting it
git clone https://github.com/wolffe-lang/wolf-lang
cd wolf-lang
cargo build --release -p wolf_driver
./target/release/wolf run corpus/hello.lu
That prints hello, wolf. To put the toolchain on your path
instead, cargo xtask install copies both artifacts to
~/.local/bin: the wolf binary and the runtime
archive it links programs against. The binary cannot link anything without
the archive beside it, which is why the install step exists. Neither step
puts a standard library beside the binary, which the published archives
do: a toolchain built from source answers use std.… only when
--std-root, WOLF_STD or a wolf.pkg
std dependency names one.
Or let a package manager do it (a Homebrew tap on macOS and linux, five packages on the AUR, all of them the project's own), or take a published archive instead of building one: installing wolf has both, and the per-platform story, including Windows, where the compiler builds and runs native programs once Visual Studio Build Tools is installed beside it — tasks, channels and signals included, with five named refusals left and each of the five measured rather than described. That page quotes what a machine without Build Tools sees, and every Windows sentence on it is asserted against the published archive by a job on a Windows runner.
The toolchain pin is Rust 1.97.1, recorded in
rust-toolchain.toml, and rustup honors it on the first
cargo invocation. There are no build scripts anywhere in the
wolf ecosystem. CI builds and tests linux x86-64, macOS aarch64 and windows
x86-64 on every change, which are also the three hosts native code
generation serves; linux aarch64 is tier-1 in the matrix with no compiled
tier behind it yet. At v0.2.41 its archive is built and gated on
an arm runner when the release is tagged, and the gate asserts what that
archive serves: wolf run and wolf run --release
each refuse the host by name with exit code 2, and the checked tier runs
the program (wolf conform-run --checked). So on linux aarch64
the toolchain checks and runs programs on the checked machine and compiles
none (wolf-lang#614). Tagged builds upload an archive per tier-1 host to the
releases page
— four at v0.2.41, and a job in this site's own CI asks every one
of those four URLs for a 200 on every change to this site. The packaging
around them is a stub, so building from source is the path that is known to
work.
Reading
- The Wolf Book
- The language text. Every sample in it is executed by CI against a pinned toolchain.
- The playground
- The reference interpreter in your browser, with corpus programs to load.
- Diagnostics and warnings
- Both catalogues, generated from the compiler's own registry.
- The specification
- Normative. Both implementations are readings of it.
- The changelogs
- What each release changed, per project, rendered from the same pinned checkouts this site is built from.
- The source
- All of it, including the issue tracker where the open problems and the known divergences live.
Bruckner revised the same symphony for twenty years and left several versions behind. This is version 0.2.41.