Zym is an embeddable scripting language/runtime. This file provides a structured overview of the official documentation. ## Getting Started - Getting Started Try Zym in the playground, download the CLI, write your first script, and compile to bytecode or standalone executables. https://zym-lang.org/getting-started.html ## CLI - CLI Reference The Zym CLI — a single binary that compiles, runs, packages, and inspects Zym programs. Includes quick reference, file types, script arguments, and native module overview. https://zym-lang.org/cli.html ## CLI Built-in Functions - print Formatted output with type-checked placeholders (%v, %s, %n, %b, %l, %m, %t, %e, %f) supporting up to 25 arguments. https://zym-lang.org/cli.html#print - clock Returns elapsed CPU time in seconds for benchmarking and timing code sections. https://zym-lang.org/cli.html#clock - sleep Pauses execution for a given number of milliseconds. https://zym-lang.org/cli.html#sleep ## CLI Preemption - Preemption Preemptive scheduling system — timeslices, yield budgets, in-script callbacks, scoped disable, fiber schedulers with continuations, and best practices. https://zym-lang.org/cli-preemption.html ## CLI Native Modules Native modules available only when running scripts through the CLI binary. - Console Terminal input, raw mode, cursor control, and ANSI styling. https://zym-lang.org/cli-console.html - File I/O Read, write, append, and manage files and directories. https://zym-lang.org/cli-file-io.html - Buffer Binary data buffers for raw byte manipulation. https://zym-lang.org/cli-buffer.html - OS Environment variables, platform detection, and system info. https://zym-lang.org/cli-os.html - Process Spawn child processes, capture output, and manage execution. https://zym-lang.org/cli-process.html - Random Random number generation and seeding. https://zym-lang.org/cli-random.html - ZymVM Runtime introspection and VM control from script code. https://zym-lang.org/cli-zymvm.html ## Language - Language Guide Variables, functions, control flow, structs, enums — the complete syntax and feature tour. https://zym-lang.org/docs-language.html - Embedding Guide VM lifecycle, native functions, two-way FFI, value system — integrate Zym into your C/C++ project. https://zym-lang.org/docs-embedding.html ## Language Semantics Deep-dive documentation for each language feature — full syntax, edge cases, and patterns. - Control Flow Conditionals, while/do-while/for loops, break & continue, goto/labels, state machines, jump tables. https://zym-lang.org/docs-control-flow.html - Functions Named functions, hoisting, overloading by arity, anonymous & arrow functions, closures, dispatchers. https://zym-lang.org/docs-functions.html - Structs & Enums Struct declaration, positional/named init, nested structs, schema hoisting; enum variants, type safety, scoping. https://zym-lang.org/docs-structs-enums.html - Tail-Call Optimization The @tco directive, modes (aggressive, safe, off), mutual recursion, accordion & shattered patterns. https://zym-lang.org/docs-tco.html - Spread Operator List spread, map spread, struct spread, override ordering, function argument spreading. https://zym-lang.org/docs-spread.html ## Core Modules Built-in functions registered automatically at VM startup. - Strings UTF-8 string queries and manipulation — length, slice, replace, split, pad, trim. https://zym-lang.org/docs-strings.html - Math Rounding, powers, trig, logarithms, interpolation, type checks — wrapping the C standard math library. https://zym-lang.org/docs-math.html - Lists Create, query, and mutate ordered collections — push, pop, sort, slice, reverse. https://zym-lang.org/docs-lists.html - Maps Key-value dictionaries with string keys — size, keys, values, entries, merge, null-deletion. https://zym-lang.org/docs-maps.html - Conversions Type inspection with typeof(), and type conversion between strings, numbers, and formatted output with str() and num(). https://zym-lang.org/docs-conversions.html - Error Handling Runtime errors and assertions with error() and assert(). https://zym-lang.org/docs-error.html - Garbage Collection Script-level GC control — pause, resume, force cycles, monitor memory, and tune thresholds. https://zym-lang.org/docs-gc.html ## Advanced - Continuations & Preemption Delimited continuations, fibers, generators, algebraic effects, and preemptive scheduling. https://zym-lang.org/docs-continuations.html - Macros & Preprocessor Compile-time macros, function-like macros, multi-line block macros, conditional compilation, and expression evaluation. https://zym-lang.org/docs-macros.html - Modules File-based module system — import(), default caching (singleton), "use fresh" directive, named imports, path resolution, and circular detection. https://zym-lang.org/docs-modules.html ## Download - Download Zym Pre-built binaries for Windows and Linux — latest release (v0.2.0). https://zym-lang.org/download.html ## Source - Repository https://github.com/zym-lang/zym