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.
| Module | Summary | Needs | Status |
|---|---|---|---|
| atomic_go | Go unsigned 64-bit atomic counters. | Go target | Stable |
| binary | Little-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_linux | Little-endian binary fields for native Linux programs. | Native Linux | Stable |
| bundle_host | Native C ABI for embedding a portable Ziran bundle. | — | Stable |
| byte_text_linux | Borrow UTF-8 bytes as a Ziran string at native foreign-function boundaries. | Native Linux | Stable |
| c_string | Copies a borrowed Ziran string into caller-owned, NUL-terminated storage. | — | Stable |
| calendar | No module description yet. | — | Stable |
| channel_go | Native Go channels with runtime element types. | Go target | Stable |
| constant_time | Constant-time equality for caller-owned byte spans. | — | Stable |
| context_go | Native Go contexts retain cancellation, deadlines and interface identity. | Go target | Stable |
| date_parse | UTC calendar parsing for feeds and dated data sources, years 1 through 9999. | — | Stable |
| date_time | No module description yet. | Host capability | Stable |
| date_time_linux | No module description yet. | Native Linux | Stable |
| date_time_types | A local or UTC civil clock reading. | — | Stable |
| ed25519_go | Ed25519 keys and signatures retain Go's native types and validation behavior. | Go target | Stable |
| environment_linux | The process environment, read through the C library. | Native Linux | Stable |
| errors_go | Native Go error creation, identity, wrapping and exact error messages. | Go target | Stable |
| file | Files on every native C target under one import: Linux, Android, the web, and Windows use file_linux. | — | Stable |
| file_go | Native Go file operations preserve filesystem permissions and error identity. | Go target | Stable |
| file_linux | No module description yet. | Native Linux | Stable |
| file_tree_linux | Paths, folders and whole files for native Linux tools and build programs: what a build script needs beyond file_linux's positional I/O. | Native Linux | Stable |
| float_text | Locale-independent IEEE 754 binary64 decimal conversion, entirely in Ziran. | — | Stable |
| format | Text built on an owned Vec(u8) builder. | — | Stable |
| go_types | Predeclared Go interface types at the foreign-library boundary. | — | Stable |
| grapheme | Unicode 17.0 extended grapheme clusters (UAX #29, GB3–GB13). | — | Stable |
| grapheme_data | Generated by scripts/grapheme_data.py from Unicode 17.0.0 UCD. | — | Stable |
| gzip_linux | Bounded native gzip over the platform zlib. | Native Linux | Stable |
| hash_map | A hash map from keys to values that runs the same on every target and the portable runner. | — | Stable |
| hmac_sha256_go | No module description yet. | Go target | Stable |
| http_get_linux | No module description yet. | Native Linux | Stable |
| http_go | Go HTTP requests, response writers and headers retain their native types and behavior. | Go target | Stable |
| image | RGBA pictures in memory and what build tools do with them: resize, composite, paste, rotate and reduce to a palette. | — | Stable |
| io_go | Native Go stream interfaces retain resource ownership and error identity. | Go target | Stable |
| jpeg | Baseline 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_bytes | Shared, allocation-free JSON string scanning. | — | Stable |
| json_document | JSON documents read into a tree that programs query, change and write back. | — | Stable |
| json_go | Go JSON serialization keeps native error values, field tags and byte storage. | Go target | Stable |
| json_quote | JSON string serialization without a document tree. | — | Stable |
| json_scan | No module description yet. | — | Stable |
| map_go | Go maps share their storage when copied or passed to a function. | Go target | Stable |
| mapped_file_linux | No module description yet. | Native Linux | Stable |
| math | Portable float32 helpers for native and bundled Ziran programs. | — | Stable |
| mutex_linux | A native POSIX mutex. | Native Linux | Stable |
| net_go | Go IP parsing, canonical formatting, loopback classification and host/port splitting. | Go target | Stable |
| net_http | No module description yet. | Host capability | Stable |
| net_http_curl_linux | No module description yet. | Native Linux | Stable |
| net_http_linux | No module description yet. | Native Linux | Stable |
| net_ws_curl_linux | Blocking, bounded WebSocket text receive for native libcurl hosts. | Native Linux | Stable |
| number_text | No module description yet. | — | Stable |
| option | No module description yet. | — | Stable |
| pair | No module description yet. | — | Stable |
| parallel_linux | Reusable native range workers. | Native Linux | Stable |
| path | No module description yet. | — | Stable |
| png_linux | PNG files to and from std/image pictures on native Linux, over the platform zlib (link -lz). | Native Linux | Stable |
| process | No module description yet. | Host capability | Stable |
| process_capture_linux | No module description yet. | Native Linux | Stable |
| process_channel_linux | An owned native child with bidirectional byte I/O. | Native Linux | Stable |
| process_run_linux | Run 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 Linux | Stable |
| queue | Allocation-free bounded FIFO queue over caller-owned byte storage. | — | Stable |
| random_go | Cryptographic random bytes from Go, preserving its count and error results. | Go target | Stable |
| random_linux | Secure operating-system randomness for native Linux programs. | Native Linux | Stable |
| resample | Pillow'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 |
| result | No module description yet. | — | Stable |
| rss_scan | No module description yet. | — | Stable |
| select_go | Select native Go channels through their boxed interface values. | Go target | Stable |
| simd | Fixed-width SIMD vectors: u8x16, s8x16, u16x8, s16x8, u32x4, s32x4, u64x2, s64x2, f32x4 and f64x2, and their 256-bit forms such as s16x16. | — | Stable |
| socket_linux | Bounded, cancellation-aware TCP client sockets for native Linux programs. | Native Linux | Stable |
| sort | Sorting and searching for slices of any type ordered by the < operator. | — | Stable |
| sql_go | Native Go SQL handles, nullable strings and transaction cleanup primitives. | Go target | Stable |
| stdio_linux | The standard streams of a native Linux program: text to standard output or standard error, and the whole of standard input. | Native Linux | Stable |
| string_range | A byte range of an immutable borrowed string. | — | Stable |
| sync_go | Go mutexes. | Go target | Stable |
| text | ASCII-only case folding keeps the result identical across native targets and the portable runner. | — | Stable |
| text_buffer | Bounded NUL-terminated byte buffer to borrowed text. | — | Stable |
| text_go | Copy between Go-owned byte slices and strings, preserving every byte. | Go target | Stable |
| text_tools | Searching, splitting and rewriting text for tools and build programs. | — | Stable |
| thread_linux | Background work for native Linux, Android and macOS programs. | Native Linux | Stable |
| thread_windows | Background work for native 64-bit Windows programs. | Native Windows | Stable |
| time_go | Go wall-clock and monotonic timestamps retain their native time.Time behavior. | Go target | Stable |
| timer_linux | No module description yet. | Native Linux | Stable |
| toml_document | TOML 1.0 documents. | — | Stable |
| unicode | Locale-independent Unicode 17.0 text operations. | — | Stable |
| unicode_data | Generated by scripts/unicode_data.zi from Unicode 17.0.0 UCD. | — | Stable |
| unicode_normalization | Canonical Unicode 17.0 NFC. | — | Stable |
| unicode_normalization_data | Generated by scripts/unicode_normalization_data.zi; Unicode 17.0.0. | — | Stable |
| update | No module description yet. | — | Stable |
| url_go | Native Go URLs preserve escaped-path selection and their original encoding. | Go target | Stable |
| utf8 | Advance one Unicode scalar in an immutable UTF-8 string. | — | Stable |
| vec | VecResizeBounded(values, count:s64, maximum_capacity:s64) -> bool has VecResize's initialized-length semantics and caps the backing element capacity. | — | Stable |
| vorbis | What 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_linux | Whole Ogg Vorbis streams held in memory, decoded over the platform libvorbisfile into signed 16-bit little-endian PCM. | Native Linux | Stable |
| web | Browser access for Ziran code compiled to WebAssembly. | — | Stable |
| zip | Classic ZIP directory reader for byte buffers. | — | Stable |
| zip_file_linux | No module description yet. | Native Linux | Stable |
| zip_linux | No module description yet. | Native Linux | Stable |
| zlib_linux | Whole 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 Linux | Stable |
| zstd_go | Native Go Zstandard streams. | Go target | Stable |
Packages
Packages live in their own repositories under github.com/ziranlang and are added as ziran.toml dependencies; see the package guide.
| Package | Summary | Modules | Status |
|---|---|---|---|
| audio | Reusable 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, resample | In progress |
| av1 | Owned AV1 decoder in handwritten Ziran. | decoder | In progress |
| avif | Optional, headless Ziran image package. | api, engine, bmff, bridge, encode, preview | In progress |
| clip-tokenizer | Portable Ziran byte-level BPE for CLIP's 77-token text input. | Tokenizer | In progress |
| compression | No README summary yet. | inflate | In progress |
| crypto | No README summary yet. | crypto, sha256, sha1, aes, bigint, sha512 | In progress |
| daochi-client | Native 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, wire | In progress |
| image-codec | Optional image decoder contracts and a measured RGBA8 baseline, authored in Ziran. | api, errors, limits, metadata, bytes, buffer, image, scheduler, benchmark | In progress |
| lua | Lua is a Ziran package that runs Lua 5.1 code in the LuaJIT dialect. | vm | In progress |
| noise | Gradient noise for Ziran, ported from FastNoiseLite and written entirely in Ziran. | fast_noise | In progress |
| oqs | Post-quantum signatures and key exchange for Ziran, from liboqs (Open Quantum Safe). | Oqs | In progress |
| qrcode | QR 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. | qrcode | In progress |
| sqlite | The SQLite C library for Ziran programs, as a package. | SQLite | In progress |
| syntax | Syntax is a small Ziran package that tokenizes Ziran, C, and Make source. | Syntax | In progress |
| telegram | Telegram account authorization and MTProto 2.0 requests implemented in Ziran. | tl, encoding, mtproto, client, auth, messages, members, session | In progress |
| webp | Optional Ziran image package reusing std/image.Image and imagecodec. | facade, engine, riff, libwebp, dynamic, authored_lossless, authored | In progress |