sysl

API reference

Library API

These pages are generated from the library’s own doc comments: every declaration, with its signature and nothing else. The written library section is the other half — what each module…

These pages are generated from the library’s own doc comments: every declaration, with its signature and nothing else. The written library section is the other half — what each module is for, why its pieces are shaped as they are, and worked examples you can run. Start there to learn a module; come here when you know what you want and need its exact signature.

Modules

ModuleSummary
syslThe core: what every program has without importing anything.
sysl.allocAllocation that may fail, answered rather than trapped.
sysl.argsHow a program’s arguments become a []string, written here because every line of it is ordinary sysl.
sysl.bufThe growable sequence and the sink built on it.
sysl.cThe C variadic forms: va_start, va_arg, va_copy and va_end.
sysl.checksumChecksums that detect accidental corruption, and a fast hash for tables – nothing an attacker cannot forge.
sysl.codecTurning a value into a format and back, written once for every type and every format.
sysl.containerFive containers, each with a shape a slice and a Buf cannot give you.
sysl.container.ringA queue of a fixed capacity, laid over storage the caller supplies, cheap to take from at either end and needing no allocator at all.
sysl.cpuAsking the processor a program is running on which instruction-set extensions it has.
sysl.cryptoCryptographic hashing: the SHA-2 family, SHA-1 and MD5, HMAC over any of them, and PBKDF2.
sysl.debugThe error return trace: where a failure was made, and each ? that handed it one frame further up on its way to the code that reported it.
sysl.dmaMemory a device can reach by address, and the handover that makes it safe to share with one.
sysl.encodingBytes as text and text as bytes: hexadecimal, base64, UUIDs, and fixed-width integers at either byte order.
sysl.encoding.jsonJSON, read and written: a document parsed into a value tree that owns itself, and a value tree written back out compactly or for a person to read.
sysl.envReading the environment a program was started with.
sysl.env.hosted
sysl.env.sys
sysl.fenvThe floating-point environment: the rounding mode, the five exception flags, and on Arm the flush-to-zero, default-NaN and alternative half-precision controls and the input-denormal flag.
sysl.fiberStacks of a program’s own, and the switch from one to another: what a runtime builds lightweight threads on, over the operating system’s threads that carry them.
sysl.fmtWhat an f"…" hole’s computed width or precision comes to — ${x}%.${n}f, ${s}%${w}s — and what an integer under a specifier renders as — ${n}%08x.
sysl.fsWhat is at the end of a path: reading and writing whole files, metadata, directories, links, and the errors any of it can answer with.
sysl.fs.errtext
sysl.fs.hosted
sysl.fs.sys
sysl.fs.watchWatching files and directories for changes: a Watcher holding any number of watches, whose descriptor is readable while it has something to report, and a read that answers what changed.
sysl.harnessA test framework that runs on the target.
sysl.hintHints to the optimizer that change what it may assume, never what a program computes.
sysl.ioThe byte surface a program reads through, and the line cursor over it.
sysl.io.hosted
sysl.io.pollWaiting on many descriptors at once: a set of them registered with the kernel – kqueue on Darwin and the BSDs, epoll on Linux – and one call that answers which are ready.
sysl.io.sys
sysl.io.waitWaiting for a descriptor with a time limit: whether a read, or a write, would go ahead without waiting, asked of the system and answered before the time runs out.
sysl.logStructured logging: a level, a message, a few named fields, and somewhere for them to go.
sysl.mathMathematics on the numeric types: the float functions, the integer ones, and the traits that let a program write both at whichever width it is already using.
sysl.math.bigintIntegers with no width: sign and magnitude, the magnitude a run of machine-word limbs.
sysl.math.complexComplex numbers, at whichever floating-point width the program is already using.
sysl.math.decimalExact decimal arithmetic: an integer coefficient and a scale, so 0.1 + 0.2 is 0.3.
sysl.math.rationalExact fractions: a numerator and a denominator, both BigInts, so a third is a third.
sysl.netSockets – a TCP stream, a UDP socket, a Unix domain stream – and the names a host resolves to.
sysl.net.hosted
sysl.net.sys
sysl.pathPath handling that is decided by the string alone.
sysl.posix.randA seed taken from the host, for a program that wants a different sequence on every run.
sysl.posix.threadssysl.threads under the name it had when its threads were pthreads, kept for the programs that import it.
sysl.posix.timeReading the two clocks the host keeps, which is the one thing sysl.time deliberately cannot do.
sysl.posix.ttyWhether escapes should be written at all.
sysl.processStarting another program and waiting for what it does.
sysl.process.hosted
sysl.process.sys
sysl.randPseudo-random numbers: a named, seedable, reproducible generator, and the distributions that are easy to get wrong.
sysl.rawThe raw tier’s reinterpreting forms: ptr_cast, str_cast, str_alias, from_raw and nonnull_unchecked (a *T taken as a *nonnull T with nothing checked).
sysl.reflect
sysl.regexMatching text against a pattern: compile one, then find, replace or split with it.
sysl.seqWhat a sequence of values can be asked, in one trait, so that a slice and a Buf answer the same names.
sysl.signalSignals as flags: a program asks to be told that one arrived, and asks again later whether it has.
sysl.signal.hosted
sysl.signal.sys
sysl.slicesOperations over a built-in slice, and the pointer a C binding needs to hand one across.
sysl.softfloat
sysl.softfloat.binary64
sysl.softfloat.libm
sysl.softint
sysl.softint.aeabi
sysl.syncWhat two threads may touch at once: Atomic[T], SpinLock, SeqLock[T], and the five memory orderings.
sysl.sysThe platform seam: everything the library asks of what it is hosted on, and nothing else.
sysl.termWhat a terminal understands: the escape sequences that colour text, emphasise it, and move the cursor about.
sysl.term.editReading a line from a terminal that will not do it for you.
sysl.term.keysKeystrokes out of the bytes a terminal sends: the decoder a full-screen program reads its keyboard through.
sysl.testingWhat a test may say about itself while it runs, beyond passing or failing.
sysl.textThe whole text surface: what a string is made of, and every operation over one.
sysl.threadsThreads of execution, and the two things a program does with one: start it, and wait for it – with the lock, the condition variable and the channel threads share things through.
sysl.threads.hosted
sysl.threads.sys
sysl.timePoints on the timeline, lengths of it, and the calendar that turns one into a date.
sysl.time.tzifReading a zone out of the bytes of a TZif file (RFC 8536), which is what the IANA time zone database is distributed as.
sysl.ttyA terminal’s mode: line by line or a keystroke at a time, echoing or not, and putting back what was there.
sysl.tty.hosted
sysl.tty.sys
sysl.unicodeWhat the Unicode Character Database says about a character, and the operations over text that only that database can answer.
sysl.vectorsLane lists for a vector’s shuffle: the rearrangements SIMD code reaches for, at every width.

Search

Esc
↑↓ to navigate ↵ to open Esc to close