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. 127 of 127 modules shipped in the latest release.

ModuleSummaryNeedsStatus
atomic_goGo unsigned 64-bit atomic counters.Go targetStable
audioAudio mixer: voices of decoded or streamed sound, each with its own gain, pitch and loop, mixed into interleaved float32 stereo at 48 kHz, with a tap that sees every mixed block.—Stable
audio_android_aaudioAAudio is loaded at runtime so an API-21 app still loads on API 21-25.—Stable
audio_android_bufferShared Android mixer boundary.—Stable
audio_android_openslAPI-21 PCM output.—Stable
audio_decode_mp3MPEG audio for std/audio: MP3 (MPEG-1, 2 and 2.5 Layer III) and Layers I and II, decoded as it plays by std/audio_mp3 over dr_mp3 at the stream's own rate.—Stable
audio_decode_vorbisRegister the existing guarded libvorbisfile decoder with std/audio.—Stable
audio_decode_wavRIFF WAVE for std/audio, PCM16, float32 and IMA/MS ADPCM, decoded by std/audio_wav.—Stable
audio_deviceCaller-owned asynchronous device open.—Stable
audio_mp3MP3 decoding: MPEG-1, MPEG-2 and MPEG-2.5, Layers I, II and III, mono and stereo, through dr_mp3 (the pinned `dr_libs` source dependency, compiled by native/ziran_mp3.c into libziran_mp3.a).—Stable
audio_mpegPortable MPEG audio stream inspection for MP3 files: MPEG-1, MPEG-2 and MPEG-2.5, Layers I, II and III.—Stable
audio_sinkImport the output device for the compilation target.—Stable
audio_sink_androidAndroid's output device for the shared audio mixer.—Stable
audio_sink_sdlDesktop audio output for std/audio: SDL2 opens the default output for 48 kHz float32 stereo, converting to what the device takes, and its audio thread pulls each block from the mixer.—Stable
audio_sink_webWebAudio output for std/audio.—Stable
audio_typesNo module description yet.—Stable
audio_wavNo module description yet.—Stable
base64RFC 4648 base64 encoding and decoding on every target, for data: URIs, embedded binary payloads and wire protocols.—Stable
binaryLittle-endian numbers in byte text, such as file or asset contents, read the same way on every native target and in the engine.—Stable
binary_linuxLittle-endian binary fields for native Linux programs.Native LinuxStable
bundle_hostNative C ABI for embedding a portable Ziran bundle.—Stable
byte_textNo module description yet.—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
contextExplicit portable execution context.—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
environmentNo module description yet.—Stable
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_treeNo module description yet.—Stable
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
finiteWhether a float is finite: false for NaN and either infinity.—Stable
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 in the engine.—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 and progressive JPEG files to and from std/image pictures, on every target: JFIF writing with 4:2:0 chroma subsampling, standard Huffman tables and the IJG quality scale that libjpeg and Pillow use; reading accepts baseline (SOF0/SOF1) and progressive (SOF2) greyscale and YCbCr JPEGs.—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_fileNo module description yet.—Stable
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
oggPortable Ogg container validation and bounded packet/page construction.—Stable
optionNo module description yet.—Stable
pairNo module description yet.—Stable
parallelNo 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
randomNo module description yet.—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
stdioNo module description yet.—Stable
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
tempScoped temporary byte storage.—Stable
textASCII-only case folding keeps the result identical across native targets and the engine.—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
threadOne portable native-thread API.—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
timerNo module description yet.—Stable
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
vorbisPortable Ogg Vorbis inspection (Vorbis I).—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
audioOptional Opus encoding/decoding and best-quality sinc conversion for Ziran, with an audio command that also uses the core WAV, MP3 and Vorbis modules.types, ogg_opus, decode_opus, opus, pipeline, resample, mp3_resample, vorbis_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
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
mermaidA standalone Ziran package for bounded Unicode terminal diagrams: flowcharts, sequences, flat state machines, classes, and entity relationships.mermaidIn progress
mesh-clientNative clients can import meshclient/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
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, native_api, dynamic, authored_lossless, authoredIn progress