41 KiB
Later
What the built plans left for later, and the problems they found and didn't fix. Each item was checked against the compiler and std on 2026-10-28, and is still open unless it says what's left of it. What was built since went, as did the records of what was built, which the CHANGELOGs keep.
The plans not yet built keep their own "Later" lists: algorithms.md, benchmarks.md, freestanding.md, linear.md, logging.md, random.md and tui.md.
roadmap.md says what's left before the language's freeze, and which items here must come before it.
The language
Lambdas that own what they use
A lambda only refers to the locals it uses. Whatever must outlive its frame is a functor
written by hand, or a function holding one. Capture lists, or a func that owns what it
captures, would let a lambda be returned or given to a thread. You set both aside when
the memory plan was built ("for now"). A function holding such a lambda would own what
it captured with nothing in function changed. It's the roadmap's last step, with
directions that avoid a list in brackets (roadmap.md).
References and values: what the rule left
What the rule "where a value goes says what happens to it", built on 2026-10-22, left:
- Only named functions are adapted. A lambda whose parameter types are written,
as
def(s: &string)given wheredef(&mut string)is asked, and a function value held in a variable, must still match. A lambda with its types left out takes them from where it goes. - A copy of
Tin generic code is refused only per instance.val x := v[i]in a generic overTcopies, and an instance whoseTcloses reports it, as C++ would. A bound saying "closes nothing" would let the template report it once. &&Tstill exists inside instances. Where a type parameter is a reference,&xof aTrefers to the variable holding it, as the template means. Only generic code sees such a type; a function given where one is asked is adapted.- A reference variable is pointed elsewhere by a reference written as one,
r = &y, as C++'s pointers are and its references aren't. Refusing it would match C++'s references, but chains walked by reassigning a reference need it. - An overloaded member named with its type's arguments, as
box::<i64>::get, is the first overload, not the one the type expected chooses. Named without them,box::getchooses. for xcopies each element, which for a large struct costs a copy thatfor &xavoids. How often the optimizer removes it hasn't been measured; for a 256-byte struct at-O2, it did.
Joining text with +
string + strview, with += as an add_assign that appends in place, which a compound
assignment calls since 2026-10-20. The compiler refuses + today: "string has no add
taking a &strview, which + calls."
More operator traits
- Traits for mixed operands, as
scales<S>for a vector times a number, once programs show which ones they need. - A partial order for floats, so generic code can say what NaN does.
- There is no
bitwisetrait, by decision: a program's own trait gives&,|and the shifts to generic code.
strview has no order
strview::compare takes the other view by value, so strview isn't ordered, and
v < w of two views is refused: "strview has no order". So the note refusing s < v of
a string and a view, which asks for s.span, leads to a second refusal.
A trait's defaults reach only the types naming it
A method a trait writes a body for is its default, which a type may leave out. The compiler
counts a type as meeting the trait by its methods, whether or not it names the trait, but
only one naming it gets the defaults. So a struct with only put passes where S: sink
for a sink asking for put and giving done, and S is sink is true of it, and the
instance then fails where the generic calls done: "plain has no field, property, or
method done. (In finish<plain>)". Either the defaults should reach every type meeting
the trait, or a type leaving a default out should meet the trait only by naming it. The
first would let writable give a flush that does nothing, so flushable could go with
if const S is flushable in std::io::writer. A constant a trait gives a value is a
default the same way, since 2026-11-19, taken only by a type naming the trait.
Named constants without a type
const pi := 3.14 is an f64, and const k := 7 an i64, so val x: f32 = pi is
refused, where the literal would fit. std::math's constants are f64 for that reason,
and f32 code writes math::pi as f32.
What a constant may hold
const b: box<i64> = box::new(3);
const s: string = string::from("abc", nothing {});
The compiler takes both, and a vector<i64> made by a function, on the machine, under
--checks and in executables. The README says a constant holds what is only read, "so a
span<T> works and a string doesn't". Which is the language isn't decided, and refusing
them later would break programs, so it comes before the freeze (roadmap.md).
decl_of of a built-in type
decl_of::<i64>() gives a declaration named i64, whose kind is target::all, 65,535, so
decl_of::<T>().kind == target::structs is false of it but
(kind & target::structs) == target::structs is true. The README says decl_of takes "a
type a declaration makes, so not a reference or a number". Refusing it, as "i64 is built
into the language, so there is no declaration of it to describe.", would break programs
later, so it comes before the freeze too.
type_of(f)::name()
It doesn't parse: "Expected ) to close the arguments. Found ::." std::args works
around it with generic helpers, as switched::<type_of(f)>(), is_command and
shape_of.
Documentation as a reflection intrinsic
An intrinsic giving a declaration's #! comment would let std::args print a field's
documentation as its help, rather than help = "..." repeating it. Only the language
server reads those comments now.
Thread-local variables
@thread_local var, reached through the thread's record at gs:[offset].
128-bit integers
Their multiplication would serve fma and hashing.
Tracking moved locals
A local moved on every path needn't be closed at all, and reading one after a move could be an error. The checker doesn't track moves: a moved-from value is left zeroed and closed as usual.
equatable and hashable for void
They'd take methods the compiler gives, and nothing needs them yet. So dict<void, V>
fails at hash<void> and equals<void>.
Refused for now
What the rules settled on 2026-10-20 refuse, where accepting it later is an addition:
- A function ending in
while truewith nobreak: "The function can end without returning a value." - A lambda's types inferred through overloads, as
go(def(a) => a + 1, 2)where twogos take a function: "The call fits more than one overload ofgoas well". Mergingspawnandspawn_withwaits on it (Threads). - A variable declared through a generic type, as
var holder::count: i64 = 0;for aholder<T>. - A property of a type rather than a value. Every property is a value's. If one's
wanted, it's better marked in the declaration, as
get()with an empty list, than inferred from whether a body usesthis, which a trait's{ get; }has no body to tell by.
What match const left
Built on 2026-11-16, with core's traits naming a type's parts (pointer, reference,
array, generic), T is vector, and packs of types walked and indexed; then aliases
of it standing for what they choose, branches and arms ruling out what they don't fit,
a body checked once for each case, and trait constants as constants; then the shapes of
T: array and T is vector, C ? A : B types, what follows a leaving branch checked
per case, and a trait ruling out what implies it; then shapes of generics taking packs,
bounded as the generic bounds them, *x of a T: pointer, and branches naming a type
checked within the generic; then tests of types, calls, and == choosing types, each part
of a condition resolved with what the parts before it proved, constants only an instance
decides worked out for each, and generic types' own variables and constants; then values
given as types not chosen yet, or used, checked in each way those can be chosen; then
ternaries choosing by constants naming type parameters, match const of values, and
T: reference as a reference. Left:
- Patterns that name parts, as
pair<type A, string>ortype L[const N]. The style is settled: a name a pattern declares is writtentype A, orconst Nfor a constant, only where a known type could stand too, so parameter lists keep<L[N]>and<def(Ts...): R>bare. Today such a shape is a trait arm and a test within it, aspair => if const T::args...[1] is string { ... }, which leaves the arms after it untried.match constrefusestypethere now, so it's an addition. C ? A : Btakes a name,!of one, a call, a name tested withisor compared with==or!=, or( expression ), and what&&and||join to those, soN > 4 ? A : Bneeds its parentheses, since<and>are a type's arguments;!takes only a name, so!small(N) ? A : Bneeds them too; afterasoris,?is the expression's; and among type arguments,M ? K1 : K2of two constants' names is read as types, where(M ? K1 : K2)is a constant, and!M ? A : Bis read as a value.if const A && BchecksBbeforeAproves anything, soif const T is pointer && T::target is integerreportsThaving notarget, twice, where a type's condition resolvesT::targetwith whatT is pointerproved. Within an instance,T::targetas a value's path, as the left ofis, is refused whereTis given a pointer, though the typeT::targetis found throughpointer.- A fault working out a constant for an instance doesn't say which, so
split<0>oftype split<const N: u64> = halves(N) ? u8 : u64;reports "Evaluating<value>stopped: Division by zero." athalves(N), with nothing ofNbeing 0. - A note a value of a type not chosen yet gives where it converts says its type
whole, as "Expected
u32, but the value isN == 4 ? u32 : uint." ofreturn w + 1;withindef f<const N: u64>(w: word<N>): u32, where a note said in one way of what uses it says which way. A way that only says what fails says nothing of it either, asTnot converting to&TwhereTis neither a reference nor a pointer, said without "(Where ...)". match constof values takes values written in place as patterns, as4,-1,'a', ortrue; a named constant or an enum's member is read as a type there, somatch const N { MAX => ... }reports no typeMAX. Such a pattern would be read as the constant it names where the subject is a constant.- A
match constvalue whose arms share no type is an error within a generic's own body, where a ternary choosing so is of a type chosen as its condition chooses, asM ? u8 : strview. - What follows a guard testing a value of a type not chosen yet names what the test
names as the first way the type can be chosen does, so after
if !(h is some(x)) { return 0; }of aW ? maybe<u64> : maybe<u8>,xis au64in what follows, where each instance has its own. - A
match constvalue's type in an instance is the one its arms share in the generic's own body only where that body is checked first, as it is for a program's generics; otherwise it is the chosen arm's.
What sealed traits left
Built on 2026-11-19: @sealed traits, whose constants and types are their own, read
through the trait given its arguments, and trait constants' values as defaults. Left:
- A sealed constant in a condition says what its value tests only of a type parameter
given for one of the trait's own, as
owns::<T>::valuedoes. Given a type holding one, asowns::<&T>::value, it says nothing within the generic's own body, so a branch it guards is checked knowing nothing, and each instance decides it. Its value says something only throughistests,&&,||,!, and other sealed constants, asif constdoes.
What pack fields left
Built on 2026-11-19: a struct's field holding a pack, items: Ts..., core's
tuple, and a pack's type at an index worked out from constant parameters,
Ts...[I]. Left:
- A pack given whole to a parameter, as
take(args)oftake<T>(x: T), givesTthe pack, which each instance then refuses with "A pack is passed on among type arguments writtenTs...". The call should be refused where it is written, as a pack bound to a local now is. - A field's pack is written a value at a time, or given whole by a literal:
t.items = argsis refused as a mismatch rather than writing each value. tuplenames no traits, since a struct names its traits for every instance and none can be named only where each of its types implements them. So a tuple is copied byte for byte where nothing in it closes, and nocopy_of,move_of,equals,hash, orcomparereaches through one.- No destructuring, as
val (a, b) := t, andt[0]is nott.items[0]. - A known pack at an index only a template knows, as
pick::<J>(1, true, 2u)withindef outer<const J: u64>(), is a type parameter bounded by nothing there, so returning it as aboolis refused even where each instance made gives abool. Amatch constover the index's values would check it as each way instead. for constover a field's pack reached through&thisreports a write to its variable once for each of the pack's types in each instance.
Contracts
What the contracts plan left for later:
- Contracts on a trait's methods, checked for every type implementing it.
oldof what closes, copied and closed after the check.- A type's invariant, checked after each of its
pubmethods. - The checker proving contracts: warning where one always fails, and leaving out one it proved, from what it already knows of bounds.
- Levels, as
--contracts expects, keeping pre-conditions only.
Calling C
What the ffi plan left for later:
- C's variables, as
errnoorenviron: avarin an extern section is a Sakura global of its own. - Variadic C functions, as
printf. A parameter writteni64...passes a span. - A C name that isn't a Sakura name, as a keyword: a name given to the symbol apart from the declaration's.
- The machine calling C on Linux, with System V's convention, so a program calling C runs without being built. It stops where it reaches one, or a C function's address: "Program uses a construct that cannot be compiled."
system::macosandsystem::freebsd. macOS needslibSystemand a Mach-O writer.
The compiler
Addresses made numbers while evaluating
remove_at,extendandstring::appendin a constant. std's containers work in a constant, butmemcpy(core/mem.sakura) turns two addresses into numbers to compare them where it moves 8 bytes or more, so evaluating stops there: "Function does not run while compiling. at memcpy". Comparing the pointers themselves (p < q,q - p) runs in a constant, somemcpycould do without the numbers.- The note doesn't say why. Evaluating says only "Evaluating
kstopped: Function does not run while compiling.", with a trace, where it could say that an address is only known where the program runs, so pointers and integers don't convert while compiling.
Small unions as values
A union of two or three words, as maybe<u64>, would be held as words and returned in
rax, rdx and rcx, so a range's next gives its maybe in registers. It's returned
in memory now. The iterators plan's numbers held without it.
Lambdas given to adapters
v.iter().filter(lambda).map(lambda).sum() costs 3 to 4 times what functors do: 565 to
599 ms against 144 to 190 ms over ten million elements at -O2 (tools/iterators.sakura).
The adapter is built by 16-byte copies, and its lambdas are called through call_value,
so they aren't inlined, even one whose function is known as a constant. Reading words
through wide copies, or a type of each lambda, would fix it.
box within 10% of raw_allocate
The memory plan asked for it. tools/memory.sakura gives box 1.31 to 1.38 times
raw_allocate. What's left:
- walking a list through a
maybe<&T>picks the next node with aselectthat the loop's exit also reads; - every
moveof a value that closes writes the zeroes its source is left with.
Atomics
lock add,lock orand the like where the result isn't used, as_ = hits.fetch_add(1), which islock xadd.fetch_and,fetch_orandfetch_xorwould lose theirlock cmpxchgloops.- Two-word atomics through
cmpxchg16b, for a pointer with a count beside it. The oldest x86-64 processors lack it.
What the vector work left
%of lanes is a loop over them, as no instruction divides integers.- The least and greatest of real lanes, and the product of integer ones, are loops.
smallestandlargestwork real lanes from lane 0, as which NaN or zero they give depends on the order, which the instructions' pairs of lanes don't keep. scatterwrites a lane at a time. Only AVX-512 has an instruction for it.- 64 bytes, AVX-512's, were checked only by disassembling what's built, as this
machine has no AVX-512. On one that has it, native's test
vectors_of_64_bytes_give_the_same_bits_at_every_levelworks each operation with the instructions, andtests/programs/simd_lanes_agree_everywhere_2, built and run, does too; the corpus itself runs on the machine. Such a vector is held in its slot, never a register, and read a quarter at a time; a mask of one is a vector, andk1holds it only within an operation. 64 bytes of 8-bit lanes aren't allowed, as their mask's bits wouldn't fit au32. The least and greatest of real lanes go a half or a quarter at a time, and the sums across the lanes,shuffle, and changing the lanes' type or size a lane at a time. - A struct of a size not a multiple of 16, as three
f32fields, is built a field at a time: merging stores fills 16 bytes from a multiple of 16 only. - 32-byte vectors go through memory a half at a time in a function working several,
as
geometry's frustum test of eight planes as onef32x8did: eachselect's and splat's result was stored whole and read back as two halves, and each splat was two shuffles wherevbroadcastssis one. It ran no faster than a plane at a time, and in one build twice as slow, where twof32x4s run twice as fast, sogeometryuses those. - A vector's lanes read as numbers, as
vec3::dotadds its products' lanes, madegeometry's rays two to three times as slow as the same dot worked a number at a time, thoughlinear's bench ofdotalone finds the two even.geometryworks its dots a number at a time.
What the analyzer's tables left
What making the analyzer's tables smaller and its passes quicker left, as checking the compiler's own sources measured it:
- Vectors made for each call checked.
arg_kinds,try_candidate, the five vectorsbegin_inferencemakes, andcheck_args_bounds's copy of the parameters are made for each call, about 1% of checking. They nest, as checking an argument checks its calls, so a scratch column would need marks, astype_table::substitute's has. - Rows for nodes that have no results. A result table has a row for each node, but many are never written: statements, type names, and declarations. Of a file's rows, 72% are of nodes with results checking the compiler, and 15% checking a corpus program, whose libraries are mostly not reached. Numbering only those nodes, as the analyzer's rework built and took out, saved 1.5% of the instructions, and the peak resident memory rose. It would pay where the rows of what isn't reached are never made, as with bodies parsed when reached.
- Evaluating what checking left. Evaluating now runs while checking, where checking
asks (1% of checking the compiler), but what the compiler needs that nothing asked for,
the values of the constants it lowers, is still worked out after checking, in
compile_time::finish: 6.8% of checking the compiler, almost all of it lowering what those constants call. It wasn't looked into. - Words written a field at a time.
zeroed_cellscounts a word as written only where one store covers it whole, so a cell built field by field, of fields narrower than a word, is zeroed though every byte of it is written. Following 4-byte halves would catch most structs.
What the analyzer's rework left
What building the changes of "If we were to rewrite the analyzer" left, as checking the compiler's own sources measured it (1,261M instructions after the rework, from 1,462M):
- Instances checked again whole. An instance checks every node of its template again, about 15% of checking the compiler. Of its templates, 21% of the top-level statements, which hold 53% of their nodes, depend on no type parameter, so an instance could read those from its template's table. Built, it left lowering an instance recursing without end, and it was taken out.
- Bodies parsed when reached. Of a corpus program's library bodies, those never reached are 59% of the tokens, 19,529 in generic bodies and 15,680 in others; of the compiler's, 7%. A generic's instance table covers its template's nodes in one run, so its body is parsed with it; the checker holds the syntax's columns by address while it checks, which nodes added while checking would move; and the resolver finds the modules a body names from its paths, so a body skipped would have its paths read from its tokens. The other bodies would save at most about 4M of a corpus program's 67M.
- Bodies checked on threads. Checking bodies is 48% of checking the compiler, but bodies write what they all share: they make 6,157 of the 14,391 types, 3,241 of the 3,246 instances, 291 of the 903 knowns, and 3,987 of the 4,300 tables, and reach 8,195 of the 9,249 declarations checked. Those IDs reach what the compiler builds, so a build that's the same every time needs them given in an order threads don't change, as in declaration order once the bodies are checked, with each body's own new types, knowns and instances held apart until then. The evaluator runs on one thread too.
- Notes as data. A note could be a code, a node, and a few IDs, its text made when
it's shown, once something reads its IDs, as the server offering fixes would. Today
the text made for notes left out is 0.01% of checking the compiler,
sakuracshows notes from another thread while checking goes on, which can't read the checker's tables, and 85 notes write lists or numbers that a few IDs don't hold. quiet. What's checked for its results alone is checked with its notes left out: a type written forthis, an attribute's type as reflection reads it, a template's branch whereif constnames what a parameter is, and an editor's query. Each could ask for what it needs without checking, so no note is made to be left out.- IDs of their own types. An enum can't be an ID's type, since a value cast to one
must be one of its members, and a struct of one
u32is kept in memory, not a register, so declarations, types, names and instances are still bareu32s; only a file's nodes and a table's are told apart, byfile_nodeandtable_node. Either needs the compiler to change first. - One more than an index. The analyzer holds none, but
id_indexkeeps an ID as one more within its words, and the compiler holds many:flows' links,reader_next,program'snicheandadapted, and a report's place. - Two records of an
if const. The checker records whether anif const's condition holds as the condition's value, and evaluating records it again indecisions, which the compiler reads.
What @inline left
-
@inlineonchecker::unalias, a test of a type's flags and a call where it fails, made the compiler 312 KB larger across its 342 calls, about 900 bytes each, and ran no fewer cycles, so it isn't marked. What a copy takes at each call is worth seeing. -
std's own helpers called in its loops over text aren't marked, std being a repository of its own:
json'splain_stopsandis_json_space, andyaml'scomment_ends. -
At
-O0a copy still writes each argument into its cell and reads it back, and each span a copy returns waits on the stores that built it, so a chain of copies waits on memory as a chain of calls does. Marked,span::subandspan::over,find_byte,find_last_byteandcount_byte, andbytes8::upperandlowerwere slower at-O0(find_byteat-O2too), so they aren't.swar::load_lastandu8::digit_valuegained only at-O2, by 4%, so they aren't either.
aarch64
There's no aarch64 back end. Atomics would be ldar, stlr and ldaxr/stlxr loops or
LSE there, which is why an atomic's order is a value as the program runs, and simd
would be NEON.
The command's name
sakurac check --help says usage: sakura check, and a wrong option says "Try
sakura build --help", the name the compiler had.
Checked executables
build --checks makes the checks of a checked program, as indexes, and none of
run --checks' of memory. A runtime with a shadow map, as AddressSanitizer has, would
check an executable's references and pointers, and the bytes nothing wrote.
Guard pages for the stack
A page nothing may touch below each stack would report an overflow from the fault, and the prologue's compare with the stack's end could go. The compiler already leaves that compare out of small leaf functions.
Fresh pages taken as zero
The compiler's result tables read zero as "nothing yet", so they grow by zeroed
elements, a file at a time, and every byte is cleared. A vector grown into pages fresh
from the system could take them as zero without clearing them, if raw_resize said
which bytes it gave fresh. Only a vector's first allocation does that today.
Reading libraries
What the std plan left for later:
- The checked
corekept between runs. It's the same for every program, so the time checking it takes could be read from a file the compiler wrote, rather than checked again. corewritten into the compiler whole. It needs the compiler to take a file in while compiling, as anembedintrinsic, which it can't now.- An index of a library's modules, written by blossom where it fetches a package, if
a library's folders ever grow too many to list. The resolver lists each folder once,
but a module's files may be in any folder within its own, so finding the files of a
library's first module, as
stdwhere--lib std=names the whole repository, lists every folder of it: the 403 folders of std's YAML test suite cost a corpus program 8M instructions of 67M. blossom names each module's library, asstd::io, which lists none of them.
Large blocks kept at one size
The runtime keeps up to 64 large blocks given back, 32 MB in all, but hands one out again only for as many bytes as it was, so the token and node vectors the lexer and parser trim to fit leave their old blocks resident, and so do the vectors that grew past them. Checking the compiler peaks at 48 MB resident where the analyzer's tables hold 28 MB.
What the race checker leaves
- Two reads a word. Of each word it keeps the last write and the last reads of two threads, so a write racing a third thread's read, while two others read too, can go unseen.
- Atomics against plain reads and writes. An atomic operation orders threads but isn't kept as an access, so a plain write racing an atomic load of the same word isn't seen.
- What only the frame reaches. A cell no reference to which is taken is never watched, which is right, as no other thread can reach it; one reached through a pointer made by arithmetic on another cell's address is missed.
- Executables. It's the machine's;
build --checkschecks no races, as it checks no memory (see Checked executables).
What overflow checks leave
- Shifts and narrowing.
<<past the bits of a type, andasnarrowing an integer, wrap as they always do. - Negating an unsigned number wraps, so
x & -xworks; Rust refuses-xof one. - Tests that wrap on purpose. blossom gives a test run on the machine
--checks, so a test's own arithmetic is checked:linear's andgeometry's fold their bits withmixfor that. std'sthreadtests seed a generator by wrapping, which stops only where they're run with--checksby hand, as blossom runs them natively, unchecked.
The machine interrupting waits
system has no signal to spare on the machine. While threads run, a futex wait without a
time lasts 0.1 s and std's waits wait again, a read blocked forever isn't interrupted, and
the first thread waits up to 3 s for the others as main ends. With a thread blocked
reading, run takes about 3.7 s, where the executable ends at once.
std
function
core's function:
- Converting where a
functionis expected, soval f: function<S> = functor;needs nofunction::new. The compiler would have to know the type by name, and the conversion allocates where the callable doesn't fit. function::bound(&mut x, T::m), binding a method to a value.- More held in place, through a constant parameter for the buffer's size, for code that must never allocate. Callables of 24 bytes or fewer are held in place now.
- An allocator for the box, once
boxtakes one as the containers do. - Constants. A constant keeps the buffer's words but not the function a function
value among them names, so
function::newreaches its buffer through its address as a number, which refuses every constantfunction. A functor that holds no function value could be allowed. - C functions, which
functionholds, but no test covers: the machine can't take a C function's address.
Threads
- A pool of threads taking tasks, and a parallel
for. The compiler's own crew (compiler/workers.sakura) could seed one. - Read-write locks, semaphores and barriers.
std::threadhas a mutex, a condition, a channel andonce. - Waiting on several channels at once.
- Calling C from any thread, on Linux. Threads started by
clonekeep the first thread'sfs, so libc's state for each thread, as malloc's caches anderrno, is shared. Five threads callingmallocandfree200,000 times each abort in glibc every time, and nothing warns. Windows starts threads throughCreateThreadand is fine. - Reentrant console locks. A thread holding
io::output_locked()that callsprintlnwaits forever, even with no other thread. - A thread given a value and giving one.
spawn_withgives ahandle<void>, so such a thread needs a closure, and a loop variable must be moved in by hand. Mergingspawnandspawn_withinto overloads waits on the checker inferring a closure's type through overloads, which it doesn't: "No overload ofgotakes these arguments."
Atomics and signals
- The signals' waiting word as an
atomic<u64>. Handlers would set it,dispatchwould empty it withexchange, and thetake_signalsintrinsic would go. - Holding signals off for a stretch of code, as a guard over
rt_sigprocmask. - Timers:
alarm, and timers that repeat.signal::alarmexists, but nothing sets one. - What a signal says of itself, as who sent it or which child stopped. A handler is
given only the
signal. - Real-time signals, and rarer ones as SIGTTIN, SIGTTOU and SIGPROF.
- Signals as a stream, through
signalfdor a pipe, sopollwakes for them.system::watchandsystem::watchednote a signal, but aren't a handle. - Chaining handlers:
handlegiving back the handler it replaced.
Processes
- Waiting for whichever of several children stops first, and capturing several at
once, for a build tool's jobs. Only
system::wait(-1, ...)waits for any child. child::send(signal), to ask a child to stop, and timeouts onwait.childhas onlykill.system::polltakes a timeout, butstd::processdoesn't use it.- The error merged into the output in order, as
2>&1, andio::file::duplicate. - Overlapped reads on Windows, in place of looking at each pipe with
PeekNamedPipeand sleeping up to 10 ms between looks. - Starting faster with
clone(CLONE_VM | CLONE_VFORK), for a large program starting many children. - Process groups and sessions, and a child that outlives the program.
Streams
- Interpolation written straight into a stream, without a
stringmade for each$"...". A language change. - Adapters: a tee, a writer that counts, a reader limited to a length, and compression.
- Reads that don't wait, timeouts, and polling several readers.
system::polldoes it for handles, but nothing instd::iodoes.
Text
- Vectors in more text functions.
find_byte, and soindex_of,contains,splitandread_line, use vectors where they're held, as domemset,memcpy,memcmpand the JSON reader.strview::find,find_any,is_ascii,upperandlower, spans'last_index_ofandcount_of, andstd::serial'sis_utf8read words only. - UTF-8 checked a word at a time past ASCII, as simdutf does.
is_utf8skips ASCII by words, then checks each sequence a byte at a time. - Hexadecimal and base64, encoded and decoded by words. std has neither.
- Comparing text without regard to ASCII case, through
lowerof each word. core::swarlanes of 16 and 32 bits, for UTF-16 and wider tables. It has bytes only.- Left a byte at a time, on measurement: trimming (0.76 to 0.93 times as fast by words), and YAML's plain scalars (0.82 to 0.97).
Reading the clock
On Linux, std::time reads the steady clock with a system call, about 211 ns in an
executable, where glibc reads it through the vDSO in 25 ns. Programs that time small work,
and the benchmarks plan, pay it on every read.
Parsing numbers
integer::parse::<T> checks only the 64-bit limits, so a narrower T wraps:
integer::parse::<u8>("300") is 44, and parse::<i8>("-200") is 56. Positive values
stop at i64's largest, so std::args reads a u64 with a reader of its own
(whole_of, signed_within and unsigned_within).
JSON, YAML and std::serial
- Fixed arrays,
T[n], aren't written or read by the walk, which refuses a type holding one. A type holding one gives a form of its own. - The walk over trait references. It's
encode<T>(value, out: &mut encoder), one indirect call for each value, because a trait couldn't be a type argument then. That works now (feed<E>(out: E) where E: sinkgiven a&mut sink), so the walk could be generic over its encoder. - Faster float printing, as Ryu. About 45% of writing JSON, 0.46 s for a 4.3 MB
document, was the runtime's
put_float, exact but working in big integers of 128 limbs. Every program printing floats pays it. - JSON Pointer, as
doc.find("/params/position/line"). - Trees that can be changed, for JSON and YAML. Both are read-only arrays of 16-byte nodes.
- A field read as a
json::value.json::valueis written but not read, so the language server readsmethodfirst, then decodesparams. - YAML: comments kept when read and written again; a writer of comments, flow style
and anchors for repeated values; tags in typed values, as
!circle {radius: 1}; and keys that are collections, whichserial::encodercan't write.
Iterators
- Splitting a sized iterator across threads.
chunks(n)andwindows(n)of a view, giving views.- Iterators that write, as
fillandcopy_into, which the algorithms plan has as methods of slices.
Math
erf,gamma,lgamma, and the Bessel functions.- Correctly rounded versions, from CORE-MATH, for programs that need results never off by a rounding. MIT-licensed, but several times larger and slower than musl's.
Time
TZ, andTZDIRbeyond Windows, read from the environment. On Linux, zones come from/usr/share/zoneinfoand/etc/localtimeonly.process::variableexists, so nothing blocks it.- Formats written with a pattern, as
strftime's. - Windows zones by name, and the history of its local zone, from the registry or
ICU.
zone::local()there is the current rule only. - Leap seconds. A day is 86,400 seconds, and a second of 60 is
out_of_range.
Arguments
std::testingreading its arguments throughstd::args.tester::runcompares--onlyand--hereby hand, sincestd::argswould refuse the other arguments tests are run with.- Environment variables as fallbacks, as
@option{ env = "SAKURA_TARGET" }for--target.process::variableexists, so nothing blocks it. - Suggestions for a misspelled option: "
--levleis not an option; did you mean--level?" - Shell completion scripts written from the declarations.
- Response files,
@arguments.txt, for lists longer than a system allows. - Help wrapped to the terminal's width. It aligns its columns but never wraps.
- The rest of the declarations checked while compiling. The marks' shapes and types
are
compile_errors, but duplicate names, duplicate short letters, which letters may be short names, andcountof an integer are checked as each run starts. Since 2026-10-28 acompile_errora running condition chooses is reported, so they could be too.
core
- A
corefor places with no heap, with the containers in a child of their own. - Lang items by attribute, as
@lang("string"), rather than by name in the modulecore, socorecould be split into modules of its own.
blossom
- The blossom plan's "Later, where wanted": more
installtags than!include, tags for the build and test pipelines, versions resolved from ranges with a lock file,blossom new, compiling in blossom's own process, and an index of packages bygpid/name. Several blossomfiles built as one project came on 2026-11-14, asmembers; several projects of their own names and versions, built together, are still later. - Not run here: an rpm package, as there's no
rpmbuild, though the spec it's built from is written and the missing tool said; a Debian package withdpkg, which isn't here either, thougharandtarread it back whole; and blossom on Windows, which was only built and checked. Its tests of its commands rungit,shandtar, so they're Linux's. - Building the compiler is checked by hand, not by a test. A test would take minutes.
- zip files are stored, not compressed, until std has deflate.
Debugging information
- No Windows debugger has read a PDB file. Visual Studio or WinDbg, stopping in a
program built with
-g, would show whether they take what LLVM's tools do. - What CodeView can't say of a variable: a value known as a constant over a range, which the DWARF gives, isn't named there; a part of a variable of several words held in the frame isn't either; and a variable whose frame slot holds the address of its object of the heap is shown as a pointer to it.
- Every function's type is
void ()in the PDB file, as the DWARF gives none, and a debugger can't call them anyway. - Names aren't qualified. Two functions of one name in different modules, as two
write_alls, are told apart by their IDs, but a debugger finding one by name finds both, as with the DWARF and the symbol tables. - Globals aren't described, in the PDB file or the DWARF.
binary::amd64'sabsolutemeetsstd::io's, so a file importing both, asnative/native.sakuradoes, writesamd64::absolute.
Tests not written
- Writing to the program's own output once nothing reads it. A test can't make its own output a closed pipe. The machine stops with status 141, as it should.
- A read from a real pipe interrupted by a signal.
io::pipe::open()exists, but the test reads a stream made to look interrupted. functionholding a C function. Seefunction.- Windows, since
externandsystem. Its sources and std's tests were checked forwindows-x86_64, and the compiler's import table matched the seed's. None of it was run, and neither was the machine's test ofucrtbase.dll(tests/machine/machine.sakura): there's no Windows or Wine here. Sincecorethe same holds, withCreateDirectoryWimported too, for the language server's copy of the built-in text. --depsfrom the compiler's own tests. Only blossom's tests runsakuracwith it, through blossom.