The Crow Programming Language

sys

The standard library's own layer: bytes, files, and a connection to a host, for the modules written in Crow and the packages that need a kernel's speed — meant for library code, which any program or package may import.

Two operations over functions, for the library (section 7 of docs/extending-crow.md): describe[f] answers a function's description as a parsed value — name, doc (the comment written above it), params (each name, takes — the word errors use for its kind: an int, a number, text, a bool, a list of ints, … — and default, or null), answers — and apply[f, args] calls the function with its arguments read by name from a parsed value or a map, each by the parameter's kind, and answers the value encoded as text: an argument missing or of another kind is an error value of kind call, the function's own failure its value. Each takes a function written, or one of a group (a list literal of functions: Specialization), and is lowered to what inference knows — a dispatch the compiler writes over every function the value can be — so both modes agree by construction. A parameter nothing types is refused with the fix (weather's parameter 'city' is typed by nothing — read it in the body, or call weather[…] once with a value of its kind); one handed a parsed value, or typed by nothing, takes what the body reads it as — handed to a builtin whose rows take one kind there, upper[city] reads it as text; read by its fields, order.lines and order.id, it is a parsed value (2026-10-20) — or its default's kind; one of a kind no name can hand (a record, a frame, a function, a handle) is refused where it is applied (far's parameter 'p' takes a record, which a call by name cannot hand it: a function called by name takes an int, a number, text, a bool or a parsed value). A call by name types the function as its parameters already say and is no call of its own: the function's kinds are its positional calls', wherever the call by name stands — describe[far] above far[Point[1.0, 2.0]] says a record, as it does below the call (a call by name had kept the kinds the body guessed as a call no later one could replace, and made a copy at them: parity 525, errors k50). They are the library's: the standard modules written in Crow and packages that run a program's functions by name — raven's llm writes a tool's schema with describe and answers a model's call with apply — though any program may import sys.

Design Note: functions as values for native rows, described and called by name. Considered: a tool written by hand beside the function (rejected in llm's note, raven's packages/llm/REFERENCE.md); a list of function values of one signature only, each a function pointer compiled (rejected: a value's name cannot be recovered compiled, so describe could not say what it was handed, and tools of several signatures — the common case — could not share a list); a new expression that chooses by a name at run time (rejected: a dispatch written once by the compiler over the members, which it knows, is the same thing without a construct). Decided (2026-10-19): a native row declares the function it takes with its signature (Kind::FnOf: any's predicate over the walked items, later's deferred work handed the rest, stream's feed handed put, route's handler the request, transact's body the connection, a chart's seek an event), and inference, the checks, the width pass and the classification read the one declaration; a list literal of functions is a group, held by name; describe and apply are sys's, lowered to a dispatch the compiler writes.

Import with use sys — meant for library code: the layer the standard library's own Crow-written modules stand on, and a package that needs a kernel's speed — bytes, files, and a connection to a host read and written as bytes. A program serves with serve[…], reads with request[…], read[…] and socket[…], and connects with connect[…], which are built on this layer (design rule 20); keeping sys to library code is a suggestion, not a rule, and any program or package may import it (Vijay, 2026-10-29).

FunctionDescriptionExample
bytes[text]The text's UTF-8 as bytes. A bytes value shows as <n bytes>, has a len, and compares with eq and ne to another; type[b] is bytesThe standard library's layer: use sys · Web: responses and submodules
text[bytes]The text the bytes spell in UTF-8; an error value of kind 'parse' where they spell noneThe standard library's layer: use sys · Web: responses and submodules · Derivations
slice[bytes, from, to]The bytes from from to to (excluded), counted from the end when negative; a span outside stopsArrays · Automatic differentiation · The standard library's layer: use sys · Strings and Interpolation
find[bytes, needle]Where the needle first occurs, or -1Regular expressions · The standard library's layer: use sys · Searching with any, all, and find
concat[a, b]The two in orderArrays · Math: tensors · The standard library's layer: use sys · Arrays and Tensors
byte[bytes, i]The byte at i as an int, counted from the end when negative; outside stopsThe standard library's layer: use sys
bytes[n]n zero bytes: a buffer a kernel written in Crow writes into by positionThe standard library's layer: use sys · Web: responses and submodules
set[bytes, i, v]The byte at i replaced by v (0 to 255), counted from the end when negative; outside stops. b = set[b, i, v] writes where the bytes lie, as a list's set doesMaps · The standard library's layer: use sys · Maps Are Dictionaries · Testing
push[bytes, v]The byte appended (0 to 255); b = push[b, v] grows the bytes where they lie, and a = concat[a, b] appends b where a liesArrays · Frames: use frame · The standard library's layer: use sys · Arrays and Tensors
open[host, port, tls, seconds]A connection to the host's port — each address the host's name resolves to tried in turn (localhost is ::1 and 127.0.0.1, and a server may listen on one) — behind TLS when tls is true (the system's roots); each read and write gives up after seconds (none when 0). An error value of kind 'sys' when none can be made: a host that does not resolve, a port nobody listens on, a certificate that does not fitThe standard library's layer: use sys
listen[host, port]A socket listening on the host's port, as a stream that is accepted on (port 0 for one the system picks; address says which); an error value of kind 'sys' where the port cannot be bound. It is neither read nor written: send and recv on it are refused, naming it a listenerThe standard library's layer: use sys
accept[listener, seconds]The next connection that arrives, as a stream of its own named by the peer's address, waiting at most the seconds (as long as it takes when 0); an error value of kind 'sys' where none arrives in time, the stream is no listener, or it is closed. The wait ends early with a stop of the work it is in, as a read's doesThe standard library's layer: use sys
address[stream]The address a stream is named by: a listener's own (127.0.0.1:54321), an accepted connection's peer, an opened connection's host and portThe standard library's layer: use sys
start[command]The process the command names, started under this program — sh -c runs the command, as shell runs one — with its standard input and output piped and its standard error the program's own, as a socket: stream_of[p] is written (the process's input) and read (its output, recv waiting at most its seconds, nothing once the output closed), and the socket keeps what a read took past a message for the next (leftover, unread). One process per command on each thread of the program, kept while the thread lives: a start of a command whose process runs on this thread answers the same socket, one whose process ended, or was closed, starts it again — per thread, since a served program's handlers run on threads of their own, and two exchanges with one process would take each other's lines. close[stream_of[p]] ends it as the MCP stdio transport says a client ends its server: the input closed, its exit waited for (1.5 s), then TERM to its process group (sh and what it runs), then KILL. An error value of kind 'sys' where the command is empty or the shell cannot start; a command the shell does not find starts, says so on standard error and ends — a read then answers nothing, a write the process ended. Made as open makes a connection, no effect of its own: its send and recv areThe standard library's layer: use sys
send[stream, bytes]The bytes written, all of them; the count. An error value of kind 'sys' on a stream that is closed or brokeThe standard library's layer: use sys · Web: responses and submodules
recv[stream, most, seconds]Up to most bytes as they arrive — none when the other side closed — waiting at most seconds (the connection's own wait when 0). The wait ends with a stop — of the work it is in (a derivation nobody waits for any more) or of the program — with the reason cancelled: nobody waits for this query any more, which a driver answers by telling its server. An error value of kind 'sys': no data from host:port in 2 s, the stream is closedThe standard library's layer: use sys · Web: responses and submodules
close[stream]The connection let go; every call after is refusedThe standard library's layer: use sys · Web: responses and submodules
concat[chunks]A list of bytes joined in order, as one (what a connection read, piece by piece), as concat[[a, b, c]] joins pieces written downArrays · Math: tensors · The standard library's layer: use sys · Arrays and Tensors
file[path]A file's bytes, as they are; an error value of kind 'sys' where it cannot be readThe standard library's layer: use sys
file_lines[path]A file's lines, read a block at a time — split at each line break, a \r before one dropped, a last line's trailing \r too, no empty line after the last break — without the whole text held beside them; an error value of kind 'sys' where it cannot be read or a line is not UTF-8The standard library's layer: use sys
store[path, bytes]The bytes written to a file, as they are; an error value of kind 'sys' where it cannot be writtenThe standard library's layer: use sys
random[n]n bytes from the operating system's randomnessThe standard library's layer: use sys
hex[bytes]The bytes as lowercase hex, two digits eachThe standard library's layer: use sys
paint[batch]A batch of WebGL2 calls handed to the page a program built for the web runs in (Building for the web, section 18), which runs them now: JSON text of a list of calls, each a list of text — a WebGL2 function's name and its arguments, each read by its form (a number, a CONSTANT, #3 for the object a call kept as 3, =text, f32:0 0.5 1 and the other typed arrays, base64f32:… for a large one (the bytes sys.float_bytes[xs, 4, true] makes, as sys.base64 writes them), true, false, null, @framebuffer); a call whose first item is #N keeps its answer as object N. Outside a browser there is no page, and nothing is drawn, in both modesDrawing in a Browser
frames[f]The page calls f[frame] before each frame it shows, from when the top level has run; frame is a parsed value — t (milliseconds), width and height (pixels), ratio (pixels per point), xr (a headset shows it), vr (one can be entered), ar (one can be entered with the room seen through it), blend (what is seen behind the drawing: opaque, alpha-blend or additive) and views, one per eye in a headset (each eye, x, y, width, height, and the eye's projection and camera, column-major), one on a screen, then what happened since the last frame (input, pointers, controllers, said: Building for the web, section 18). A later frames[g] replaces f, from the next frame. What f answers is not read, as later's work's is not, but a failure stops the program, naming its line. Outside a browser no frame comes, in both modesMath: random, signal, special, and sparse · Drawing in a Browser
text[bytes, fill]The text the bytes spell, each run that spells none replaced by fill ('�', as a browser shows one) — never an errorThe standard library's layer: use sys · Web: responses and submodules · Derivations
hash[bytes, algo]The digest as lowercase hex: 'sha256', 'sha512', 'crc32' (eight digits, the checksum gzip and Kafka carry), 'sha1' or 'md5'The standard library's layer: use sys · The system: shell, environment, time, arguments · Reactive State and Events
digest[bytes, algo]The digest as bytes: 'crc32' (four bytes), 'sha1' (a socket's accept key), 'sha256', 'sha512' or 'md5'The standard library's layer: use sys
hmac[key, message, algo]The keyed digest as bytes: 'sha256' (an S3 signature's chain) or 'sha512'The standard library's layer: use sys
reply[status, body, headers]A request's answer from its parts: the record request answers, made by the client written in CrowThe standard library's layer: use sys
replaying[], recording[], rehearsing[]Whether a replay answers the requests (crow test --fixtures); whether a recording keeps what they answer (crow check --record-fixtures); whether a rehearsal stands in for them (crow check)The standard library's layer: use sys
replayed[method, url, body]The request's answer from its fixture — the replay's project's, else the recording's, else the rehearsal's — or the miss: an error value of kind 'http', noted for the run's report in a replayThe standard library's layer: use sys
recorded[method, url, body, status, text, headers]In a recording, what the request was answered, kept as its fixture under .crow/fixtures; nothing otherwise. An error value of kind 'sys' where it cannot be writtenThe standard library's layer: use sys
answer[status, phrase, headers, body]A server's answer from its parts, its body as bytes: the record exchange and fetch answer — status, phrase, headers (names in lower case) and bodyThe standard library's layer: use sys
csv_rows[text]CSV text as rows, each a map from its column's name to its text; an error value of kind 'io' where it does not parseThe standard library's layer: use sys
frame_of_csv[text], frame_of_csv_bytes[bytes], frame_of_json[text], frame_of_parquet[bytes], frame_of_rowbinary[bytes], frame_of_postgres[bytes]A table as a frame, from CSV text (or a CSV file's bytes read where they are, which load uses: no copy of the text), JSON records, Parquet bytes, ClickHouse's RowBinaryWithNamesAndTypes, or the messages Postgres answers a query with (its row description, rows, completion and ready-for-query). Each column is typed as the server names it: integers an int column (a ClickHouse UInt64 past an int cell's 64 bits refuses the whole, naming its column — CAST it to String to keep its digits; it had wrapped round to a negative number), floats, decimals and numerics floats (a decimal the float nearest its value, every digit of it read — a 256-bit decimal's high bits had been dropped), booleans bools, dates and timestamps a datetime column (a fraction of a second kept to the millisecond, a zone's offset kept), a NULL a missing cell, ClickHouse's enums by name and its UUIDs, IPs, 128- and 256-bit integers (their exact digits and sign) and arrays as text, anything else text; a ClickHouse type no cell holds, or a Postgres cell sent in the binary format, refuses the whole; a Postgres error is the reason in the server's words, and bytes that end before the ready-for-query "end early" (the driver reads more); an error value of kind 'frame'The standard library's layer: use sys
frame_csv[frame], frame_json[frame], frame_parquet[frame]A frame as CSV text, as JSON records, or as Parquet bytesThe standard library's layer: use sys
tensor_of_frame[frame]A frame's cells as a matrix, a row each; an error value of kind 'load' where a cell is no numberThe standard library's layer: use sys
base64[bytes]The bytes as base64, the standard alphabet padded with = (HTTP's Basic authorization, SMTP's AUTH PLAIN)The standard library's layer: use sys
base64url[bytes]The bytes as base64 in the URL-safe alphabet, unpadded, as a token's parts are writtenThe standard library's layer: use sys
unbase64[text]Base64's bytes, either alphabet, padded or not; an error value of kind 'parse' where the text is no base64The standard library's layer: use sys
same[a, b]Whether two byte strings are equal, decided in time that does not depend on where they differ (a signature checked against the one computed)The standard library's layer: use sys
pack[n, width, little = false]An int as width bytes, big-endian, or little-endian with little — 1, 2, 4 or 8, the low bytes of its two's complement; another width stopsThe standard library's layer: use sys
unpack[bytes, at, width, little = false, signed = true]The int the width bytes at at spell (little-endian with little; unsigned with signed false, where 8 bytes past 2^63 are refused), big-endian two's complement — 1, 2, 4 or 8 — the counterpart of pack; a span outside the bytes, or another width, stopsThe standard library's layer: use sys
ieee[x, width = 8, little = false]A number as the 8 bytes of its IEEE 754 double, big-endian — or the 4 of its single precision with width 4, little-endian with littleThe standard library's layer: use sys
terms[text]The words of a text — each run of letters and digits, Unicode's, lowercased — in order, as a search index and a query split themThe standard library's layer: use sys
float_bytes[floats, width, little], float_values[bytes, at, n, width, little]A list of floats as their bits one after another, 8 bytes each or 4 of single precision, little-endian where little is true, and n floats read back from the bytes at at: a chunk's worth at once, where ieee writes and reads oneThe standard library's layer: use sys
ieee[bytes, at, width, little]The float the width bytes at at spell — 8 of a double, 4 of single precision — little-endian where little is true; outside stops. (Its width and byte order are positions, since the writer's options may be given by position: ieee[x, 4])The standard library's layer: use sys
binary[bytes, media]A response of the bytes, as the media type names them (msgpack's)The standard library's layer: use sys
mask[bytes, key]The bytes XORed with the 4-byte key, cycling: a client's frame masked, a masked frame readThe standard library's layer: use sys
read_head[stream, deadline]A connection's answer's head read to its blank line — the status and phrase, the headers — and, as the answer's body, what came after it (a body's start, a socket's first frame); written in CrowThe standard library's layer: use sys
upgrade[url, timeout]A connection to a ws:// or wss:// URL's host upgraded to a WebSocket as RFC 6455 says — the key sent, the server's accept checked — or the reason; the socket holds what came after the head; written in CrowThe standard library's layer: use sys
socket_of[stream, url, unread], stream_of[socket]A socket over a stream — one the handshake upgraded, or a process's (start) — holding bytes unread; the stream a socket talks overThe standard library's layer: use sys
leftover[socket], unread[socket, bytes]The bytes a socket holds unread, taken; bytes put back for its next read (what a read took past a frame's end)The standard library's layer: use sys
mailer_field[mailer, name]What a mailer holds: its host, port (as text), user or pass; another name stopsThe standard library's layer: use sys
secure[stream, host]A plain connection put behind TLS from here on (SMTP's STARTTLS), the certificate checked against the host's name; the same stream for every value that holds it, or an error value of kind 'sys'The standard library's layer: use sys
civil[t]A moment's civil date and time, UTC, as a list: the year, month and day, the hour, minute and second, and the day of the week (0 is Sunday); written in CrowThe standard library's layer: use sys
betainc[x, a, b]The regularized incomplete beta function I_x(a, b): the t and F distributions are written over itThe standard library's layer: use sys
gammainc[a, x]The lower regularized incomplete gamma function P(a, x): the chi-square distribution is written over itThe standard library's layer: use sys
lgamma[x]The natural log of the gamma functionThe standard library's layer: use sys
note[stream, key, text], noted[stream, key]A note kept on a connection under a key, read back (empty when there is none; empty text lets the key go): a query's id and a backend's process and key — what a cancel needs later — how long the server keeps the connection, the statements prepared on itThe standard library's layer: use sys
machine[], process[], alive[pid]This machine's name (letters, digits, dots and dashes, or local), this process's number, and whether a process of this machine is running (a number that is none counts as running)The standard library's layer: use sys
xor[a, b]The bytes XORed one with the other, of one length (a SCRAM proof)The standard library's layer: use sys
copy_of_frame[frame]The frame's rows in Postgres's COPY text format: a tab between cells, a line per row, \N for a missing cell, a backslash, a tab, a line break and a return escaped; a whole float without its decimals, a truth as t or f, a moment as it is writtenThe standard library's layer: use sys
rowbinary_of_frame[frame, types]A frame as ClickHouse's RowBinary, each column encoded as the table's type for it names (one per frame column, in the frame's order): what INSERT … FORMAT RowBinary takes after the statement; a missing cell NULL where the type holds one, else the type's own nothing; a decimal as its digits at the type's scale, a half away from zero (a float as the shortest text that reads back as it); a cell a type cannot hold — a number past its range, a fraction where a whole number is taken — is an error value of kind 'frame' naming the column (a number had been cut to the type's width: 300 written as a UInt8 had been 44)The standard library's layer: use sys
shaped[t, dims]The tensor's values in the shape the list of sizes names: reshape given its sizes as a list, as a Crow function's rest arrivesThe standard library's layer: use sys
remote[path]Whether a path names a remote source: a URL (http://, https://) or an S3 object (s3://)The standard library's layer: use sys
exchange_on[stream, hostline, method, path, lines, body, deadline, keep]One request on a connection already open, written in Crow — the method, the path, the host line, connection: keep-alive when the connection is kept for the next request else close, the body's length and the header lines — and its answer read: what exchange does on a connection of its own, and a driver on one it keepsThe standard library's layer: use sys
exchange[url, method, lines, body, timeout]One HTTP exchange, written in Crow: the request sent to the URL's host with its method, the header lines and the body, its answer read whole — an answer, or an error value of kind 'sys' where none came in timeout seconds (0 as thirty to connect and ten minutes in all)The standard library's layer: use sys
redirected[from, location]Where a redirect sends the request: its location, made absolute against the URL it came fromThe standard library's layer: use sys
with_query[url, pairs]The URL with the pairs added, each name and value URL-encoded, after the ? it has or one it is givenThe standard library's layer: use sys
fetch[path, headers, query, timeout]A remote source's answer, written in Crow: a URL got with a reader's options and its redirects followed, or an S3 object got signed — a success, or the reason as an error value of kind 'sys' (the options on a path that is no URL, a timeout below 0, no answer, an answer that is no success)The standard library's layer: use sys · Views: the whole element vocabulary
put[path, bytes]The bytes written to an S3 object, signed; a URL is refused — it is read, not writtenThe standard library's layer: use sys · Web: responses and submodules
format_of[path]A table's format by its path's extension (a URL's query left out): 'csv', 'json', 'parquet', or ''The standard library's layer: use sys
format_sniffed[media, bytes]The format of what a URL with no extension answered: the media type its server named, then the bytes themselves (Parquet's PAR1, JSON's opening bracket), and CSV otherwiseThe standard library's layer: use sys
filesize[path]How many bytes a file holds, from its metadata, the file unread; an error value of kind 'sys' for a directory or a path that is no fileThe standard library's layer: use sys
file[path, from, n]The n bytes at from of a file, read without the rest (a footer, one chunk); an error value of kind 'sys' where the region lies outside itThe standard library's layer: use sys
modified[path]When the file was last written, a moment; an error value of kind 'sys' where it cannot be readThe standard library's layer: use sys
flushed[path]The file, or the directory, written through to the disk (F_FULLFSYNC on macOS, fsync elsewhere), answering the path — the write path of a file a kernel places: written beside its name, flushed, linked into the name, the directory flushedThe standard library's layer: use sys
link[from, to]A hard link, refused with the system's reason where to exists (a name claimed once); answers toThe standard library's layer: use sys
move[from, to]Renamed over to, atomically, as a manifest is replaced; answers to (rename is the frame module's)The standard library's layer: use sys
cell_kind[column]int, float, text, bool, moment or vector — a column as its parts (Magpie's magpie-in-crow.md, 2.5): what a file's writer reads and its reader builds, with no value per cellThe standard library's layer: use sys
ints_of[column, from, to]An int column's values of rows from to to (excluded), or a moment column's milliseconds; a missing cell reads as 0 in every one of these (0.0, false, empty text, zeros for a vector), the same in both modes, and present_of says whichThe standard library's layer: use sys
floats_of[column, from, to], bools_of[column, from, to]A float column's values (a vector column's rows laid flat), a bool column'sThe standard library's layer: use sys
millis_of[column, from, to], zones_of[column, from, to]A moment column's milliseconds and its offsets in minutesThe standard library's layer: use sys
vectors_of[column, from, to], vector_width[column]A vector column's rows laid flat, and how many numbers each holdsThe standard library's layer: use sys
text_bytes_of[column, from, to], text_ends_of[column, from, to]A text column's cells' UTF-8 one after another (a missing cell empty), and where each cell ends in itThe standard library's layer: use sys
present_of[column, from, to], missing_in[column, from, to]Which cells are present as a bitmap's bytes (bit i of byte i / 8 for cell from + i; no bytes where every cell is), and how many are missingThe standard library's layer: use sys
ints_column[ints, present], floats_column[floats, present], bools_column[bits, n, present], moments_column[millis, zones, present], vectors_column[width, floats, present], text_column[bytes, ends, present], text_dict_column[bytes, ends, codes, present]A column from its parts, present the bitmap present_of answers or no bytes for every cell; written onto a frame with df.name = column. Refused where the parts disagree: more offsets than milliseconds, numbers that fill no row, bytes that spell no text, an end outside themThe standard library's layer: use sys

A stream is one connection however many values hold it, as a socket is; type[s] is stream. A socket is a stream and what it read past the last message — a WebSocket's connection after its handshake, or a process started under the program (start), whose output comes line by line; type[p] is socket, and it shows as <socket /bin/cat>. Every function works identically in both modes (crow_runtime::sys). The HTTP protocol is written on this layer, in src/modules/sys.co, as functions of sys itself: a URL taken apart, a connection opened plain or behind TLS, the request line, headers and body sent, the answer's head read to its blank line and its body by its length, by its chunks, or until the server closes (exchange), redirects followed and a reader's options applied (fetch), an S3 object signed as AWS's Signature Version 4 says and read or written by path at an endpoint (fetch, put). On the protocol stand the HTTP client — request (Requests), in src/modules/core.co — and every reader of a URL or an S3 object: read and write (core.co), use io's csv and lines (io.co), use frame's load and save (frame.co) and use math's load (math.co), each a few lines over the layer's parsers (csv_rows, frame_of_csv, tensor_of_frame). A program never sees the layer: it sees request and read, effects the session layer holds, whose rows in the builtin table are the contracts the Crow bodies keep until effects are declared on the layer's own rows (Design Note "a module written in Crow declares its functions by writing them"; docs/extending-crow.md, phase 3).

use sys

b = bytes['héllo']
log[len[b]]                      --- 6 (two bytes for é)
log[text[slice[b, 3, 6]]]        --- llo
log[find[b, bytes['llo']]]       --- 3
bad = text[slice[b, 1, 2]]       --- half of é: not text
log[bad.kind]                    --- parse
s = open['127.0.0.1', 1, false, 0.2]
log[s.kind]                      --- sys: nobody listens on port 1

Design Note: a process is a socket. start came for the Model Context Protocol's stdio transport (2026-10-20; raven's mcp since 2026-11-07, whose REFERENCE.md keeps how it names a server by its command), which needed a process held open. Considered: a handle kind of its own, declared beside sys's rows (rejected: a kind is a Value variant, a Kind, an Arg and an arm in every rule that meets them — a compiler change, where the compiler is frozen — and a process is read and written as bytes, which is what a stream is); a stream, start[command] answering what open answers (rejected: a message is a line, and what a read takes past the line's end must stay with the process for the next read, which is what a socket holds beside its stream); a process per message (rejected: a server such as npx … takes seconds to start, and the protocol says a client restarts a server only when it exits). Decided: a process is a socket, as a WebSocket's connection is — type[p] is socket, send, recv, leftover, unread and close serve it, and nothing was added but start — and the process is the runtime's, one per command on each thread, found and started by start (per program had let two handlers of a served program write to one process at once and read each other's lines).

Design Note: the standard library's layer. Considered: writing the standard library's modules in Rust only, as they were (rejected: a module both backends share is a bug both share, which no parity or fuzz run can see; the week of 2026-10-03 found eleven bugs where the two backends differ and none in the kernels they share, because nothing can look there); giving every program bytes, sockets and threads (rejected: a program would gain the bug classes the language exists to exclude — data races, half-read buffers, protocol state spread over user code — and a second way to serve and connect beside serve and connect). Decided (Vijay, 2026-10-03): one sys module, the smallest native layer the rest of the library can be written on, importable by the compiler's own modules alone; a program sees one way, and every module written on sys is compiled and run twice, fuzzed, and takes laws. Then (Vijay, 2026-10-29): importable by any program or package — keeping it to the standard library is a suggestion, not a rule — so a package that needs bytes and files at a kernel's speed is written on it outside the standard library, and the reference still teaches serve and connect as a program's one way to serve and connect.

Generated by crow test --docs --write from the language specification, section 11 and 13. Edit the spec, not this page.