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.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.checksumChecksums that detect accidental corruption and nothing else.
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.cryptoCryptographic hashing: the SHA-2 family, SHA-1 and MD5, HMAC over any of them, and PBKDF2.
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, read, written in place or appended.
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.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.harnessA test framework that runs on the target.
sysl.ioThe byte surface a program reads through, and the line cursor over it.
sysl.io.hosted
sysl.io.sys
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 32-bit 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.netBlocking sockets – a TCP stream, a UDP socket – 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.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.softint
sysl.softint.aeabi
sysl.syncWhat two threads may touch at once: Atomic[T], SpinLock, 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.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.

Search

Esc
↑↓ to navigate ↵ to open Esc to close