Standard library

Import a module with #import "std/NAME". Modules ending in _linux, _windows or _go build only for that target. A module that needs a host capability runs in a portable bundle only when the program hosting the bundle binds it. 97 of 97 modules shipped in the latest release.

ModuleSummaryNeedsStatus
atomic_goGo unsigned 64-bit atomic counters.Go targetStable
binaryLittle-endian numbers in byte text, such as file or asset contents, read the same way on every native target and in the portable VM.—Stable
binary_linuxLittle-endian binary fields for native Linux programs.Native LinuxStable
bundle_hostNative C ABI for embedding a portable Ziran bundle.—Stable
byte_text_linuxBorrow UTF-8 bytes as a Ziran string at native foreign-function boundaries.Native LinuxStable
c_stringCopies a borrowed Ziran string into caller-owned, NUL-terminated storage.—Stable
calendarNo module description yet.—Stable
channel_goNative Go channels with runtime element types.Go targetStable
constant_timeConstant-time equality for caller-owned byte spans.—Stable
context_goNative Go contexts retain cancellation, deadlines and interface identity.Go targetStable
date_parseUTC calendar parsing for feeds and dated data sources, years 1 through 9999.—Stable
date_timeNo module description yet.Host capabilityStable
date_time_linuxNo module description yet.Native LinuxStable
date_time_typesA local or UTC civil clock reading.—Stable
ed25519_goEd25519 keys and signatures retain Go's native types and validation behavior.Go targetStable
environment_linuxThe process environment, read through the C library.Native LinuxStable
errors_goNative Go error creation, identity, wrapping and exact error messages.Go targetStable
fileFiles on every native C target under one import: Linux, Android, the web, and Windows use file_linux.—Stable
file_goNative Go file operations preserve filesystem permissions and error identity.Go targetStable
file_linuxNo module description yet.Native LinuxStable
file_tree_linuxPaths, folders and whole files for native Linux tools and build programs: what a build script needs beyond file_linux's positional I/O.Native LinuxStable
float_textLocale-independent IEEE 754 binary64 decimal conversion, entirely in Ziran.—Stable
formatText built on an owned Vec(u8) builder.—Stable
go_typesPredeclared Go interface types at the foreign-library boundary.—Stable
graphemeUnicode 17.0 extended grapheme clusters (UAX #29, GB3–GB13).—Stable
grapheme_dataGenerated by scripts/grapheme_data.py from Unicode 17.0.0 UCD.—Stable
gzip_linuxBounded native gzip over the platform zlib.Native LinuxStable
hash_mapA hash map from keys to values that runs the same on every target and the portable runner.—Stable
hmac_sha256_goNo module description yet.Go targetStable
http_get_linuxNo module description yet.Native LinuxStable
http_goGo HTTP requests, response writers and headers retain their native types and behavior.Go targetStable
imageRGBA pictures in memory and what build tools do with them: resize, composite, paste, rotate and reduce to a palette.—Stable
io_goNative Go stream interfaces retain resource ownership and error identity.Go targetStable
jpegBaseline JPEG files from std/image pictures, on every target: JFIF with 4:2:0 chroma subsampling, the standard Huffman tables and the IJG quality scale that libjpeg and Pillow use.—Stable
json_bytesShared, allocation-free JSON string scanning.—Stable
json_documentJSON documents read into a tree that programs query, change and write back.—Stable
json_goGo JSON serialization keeps native error values, field tags and byte storage.Go targetStable
json_quoteJSON string serialization without a document tree.—Stable
json_scanNo module description yet.—Stable
map_goGo maps share their storage when copied or passed to a function.Go targetStable
mapped_file_linuxNo module description yet.Native LinuxStable
mathPortable float32 helpers for native and bundled Ziran programs.—Stable
mutex_linuxA native POSIX mutex.Native LinuxStable
net_goGo IP parsing, canonical formatting, loopback classification and host/port splitting.Go targetStable
net_httpNo module description yet.Host capabilityStable
net_http_curl_linuxNo module description yet.Native LinuxStable
net_http_linuxNo module description yet.Native LinuxStable
net_ws_curl_linuxBlocking, bounded WebSocket text receive for native libcurl hosts.Native LinuxStable
number_textNo module description yet.—Stable
optionNo module description yet.—Stable
pairNo module description yet.—Stable
parallel_linuxReusable native range workers.Native LinuxStable
pathNo module description yet.—Stable
png_linuxPNG files to and from std/image pictures on native Linux, over the platform zlib (link -lz).Native LinuxStable
processNo module description yet.Host capabilityStable
process_capture_linuxNo module description yet.Native LinuxStable
process_channel_linuxAn owned native child with bidirectional byte I/O.Native LinuxStable
process_run_linuxRun native Linux child processes from build and release programs: any number of arguments, a working directory, environment changes, and each standard stream inherited, discarded, read from or written to a file, or captured.Native LinuxStable
queueAllocation-free bounded FIFO queue over caller-owned byte storage.—Stable
random_goCryptographic random bytes from Go, preserving its count and error results.Go targetStable
random_linuxSecure operating-system randomness for native Linux programs.Native LinuxStable
resamplePillow's separable resampling of 8-bit RGBA as allocation-free row kernels, with std/simd versions for x86-64 (SSE2 to AVX2), NEON (AArch64 and ARMv7) and WebAssembly SIMD128 that make the same bytes.—Stable
resultNo module description yet.—Stable
rss_scanNo module description yet.—Stable
select_goSelect native Go channels through their boxed interface values.Go targetStable
simdFixed-width SIMD vectors: u8x16, s8x16, u16x8, s16x8, u32x4, s32x4, u64x2, s64x2, f32x4 and f64x2, and their 256-bit forms such as s16x16.—Stable
socket_linuxBounded, cancellation-aware TCP client sockets for native Linux programs.Native LinuxStable
sortSorting and searching for slices of any type ordered by the < operator.—Stable
sql_goNative Go SQL handles, nullable strings and transaction cleanup primitives.Go targetStable
stdio_linuxThe standard streams of a native Linux program: text to standard output or standard error, and the whole of standard input.Native LinuxStable
string_rangeA byte range of an immutable borrowed string.—Stable
sync_goGo mutexes.Go targetStable
textASCII-only case folding keeps the result identical across native targets and the portable runner.—Stable
text_bufferBounded NUL-terminated byte buffer to borrowed text.—Stable
text_goCopy between Go-owned byte slices and strings, preserving every byte.Go targetStable
text_toolsSearching, splitting and rewriting text for tools and build programs.—Stable
thread_linuxBackground work for native Linux, Android and macOS programs.Native LinuxStable
thread_windowsBackground work for native 64-bit Windows programs.Native WindowsStable
time_goGo wall-clock and monotonic timestamps retain their native time.Time behavior.Go targetStable
timer_linuxNo module description yet.Native LinuxStable
toml_documentTOML 1.0 documents.—Stable
unicodeLocale-independent Unicode 17.0 text operations.—Stable
unicode_dataGenerated by scripts/unicode_data.zi from Unicode 17.0.0 UCD.—Stable
unicode_normalizationCanonical Unicode 17.0 NFC.—Stable
unicode_normalization_dataGenerated by scripts/unicode_normalization_data.zi; Unicode 17.0.0.—Stable
updateNo module description yet.—Stable
url_goNative Go URLs preserve escaped-path selection and their original encoding.Go targetStable
utf8Advance one Unicode scalar in an immutable UTF-8 string.—Stable
vecVecResizeBounded(values, count:s64, maximum_capacity:s64) -> bool has VecResize's initialized-length semantics and caps the backing element capacity.—Stable
vorbisWhat an Ogg Vorbis stream held in memory declares, read from its pages alone: nothing is decoded or allocated, so a program can bound a stream before handing it to a decoder (std/vorbis_linux on Linux, or another platform's).—Stable
vorbis_linuxWhole Ogg Vorbis streams held in memory, decoded over the platform libvorbisfile into signed 16-bit little-endian PCM.Native LinuxStable
webBrowser access for Ziran code compiled to WebAssembly.—Stable
zipClassic ZIP directory reader for byte buffers.—Stable
zip_file_linuxNo module description yet.Native LinuxStable
zip_linuxNo module description yet.Native LinuxStable
zlib_linuxWhole zlib, gzip or raw deflate streams over the platform zlib, into growing vectors: what PNG files, gzip archives and other formats need when the result's size is not known in advance.Native LinuxStable
zstd_goNative Go Zstandard streams.Go targetStable

Packages

Packages live in their own repositories under github.com/ziranlang and are added as ziran.toml dependencies; see the package guide.

PackageSummaryModulesStatus
audioReusable Opus encoding/decoding, Ogg Opus inspection, best-quality sinc sample-rate conversion and WAV I/O, with a native audio command.types, ogg, wav, opus, pipeline, resampleIn progress
av1Owned AV1 decoder in handwritten Ziran.decoderIn progress
avifOptional, headless Ziran image package.api, engine, bmff, bridge, encode, previewIn progress
clip-tokenizerPortable Ziran byte-level BPE for CLIP's 77-token text input.TokenizerIn progress
compressionNo README summary yet.inflateIn progress
cryptoNo README summary yet.crypto, sha256, sha1, aes, bigint, sha512In progress
daochi-clientNative clients can import daochiclient/cryptonative for bounded byte-slice SHA-256, streaming digests, HMAC-SHA-256, XChaCha20-Poly1305, secure random bytes, clearing buffers and compatible Argon2id exports.authorization, authorization_owner, delegated, async_delegated, envelope, account, async_account, async_client, async_sync, sync_flow, auth, client, crypto, crypto_native, events, keys, record, record_codec, release, entity, social, rewards, sync, transaction, url, wireIn progress
image-codecOptional image decoder contracts and a measured RGBA8 baseline, authored in Ziran.api, errors, limits, metadata, bytes, buffer, image, scheduler, benchmarkIn progress
luaLua is a Ziran package that runs Lua 5.1 code in the LuaJIT dialect.vmIn progress
noiseGradient noise for Ziran, ported from FastNoiseLite and written entirely in Ziran.fast_noiseIn progress
oqsPost-quantum signatures and key exchange for Ziran, from liboqs (Open Quantum Safe).OqsIn progress
qrcodeQR Code is a small Ziran package that encodes text as a QR Code: one byte-mode segment, versions 1 to 40, the four error correction levels and an automatically chosen mask.qrcodeIn progress
sqliteThe SQLite C library for Ziran programs, as a package.SQLiteIn progress
syntaxSyntax is a small Ziran package that tokenizes Ziran, C, and Make source.SyntaxIn progress
telegramTelegram account authorization and MTProto 2.0 requests implemented in Ziran.tl, encoding, mtproto, client, auth, messages, members, sessionIn progress
webpOptional Ziran image package reusing std/image.Image and imagecodec.facade, engine, riff, libwebp, dynamic, authored_lossless, authoredIn progress