ai_kernels
Optional native C-kernel bridge for AI hot loops. These functions are intended for native builds that link matching C objects.
12 functions detected.
SDK reference
Search modules and functions. Stable production docs should grow from this generated base.
Optional native C-kernel bridge for AI hot loops. These functions are intended for native builds that link matching C objects.
12 functions detected.
arduino module — TezzNative 2.0 Arduino Hardware Abstraction Layer Enables writing native TezzNative programs for Arduino AVR boards. Compiles to AVR machine code via TezzNative's cross-compile target: tezzc buildexe --target=avr-atmega328p main.tn main.hex Supported boards (via target flag): avr-atmega328p — Arduino Uno, Nano, Mini avr-atmega2560 — Arduino Mega avr-attiny85 — Digispark, ATtiny85 All timing functions use AVR hardware timers (no floating-point). All I/O maps directly to AVR port registers (PORTB, PORTC, PORTD). Usage: import "arduino" fn setup() -> int: arduino.pin_mode(13, arduino.OUTPUT) ret 0 fn loop() -> int: arduino.digital_write(13, arduino.HIGH) arduino.delay(500) arduino.digital_write(13, arduino.LOW) arduino.delay(500) ret 0 fn main() -> int: setup() while 1: loop() ret 0
70 functions detected.
arena module — bump/arena allocator for fast batch allocation Arenas allocate from a contiguous buffer and free all at once. Use for temporary computation, parser state, request lifetime, etc. Usage: a:*Arena = arena_new(1024 * 1024) // 1 MB arena buf:*char = arena_alloc(a, 256) // bump-allocate 256 bytes arena_reset(a) // free all at once (O(1)) arena_free(a) // release arena itself
13 functions detected.
autodiff module (Phase 4 scaffold)
29 functions detected.
color module — TezzNative 2.0 Native Color & Style System Full TrueColor (24-bit RGB) ANSI terminal support for CLI and GUI programs. Auto-detects TrueColor capability. Falls back gracefully to 256-color or basic. Features: • RGB TrueColor foreground/background • 256-color palette (xterm256) • Standard 16 named colors • Text styles: bold, italic, underline, dim, blink, reverse, strikethrough • Styled string builder: compose multi-attribute styled text • Progress bar renderer (animated, colored) • Table renderer (bordered, colored headers) • Gradient text renderer • Pixel-native RGBA color packing/unpacking • CLI spinner animation frames • Color detection: TrueColor / 256 / 16 / none
97 functions detected.
cyber module: Hacking and Cybersecurity utilities for TezzNative. Provides rapid prototyping tools for security research, penetration testing, and cryptography.
6 functions detected.
Core SDK module.
14 functions detected.
Core SDK module.
2 functions detected.
event module: deterministic UI/input event queue primitives. Hosted runtime lanes implement these via builtins for stability.
10 functions detected.
frame module: deterministic rect + damage-region utilities for GUI compositors.
18 functions detected.
gpu module: experimental GPU compute abstraction for TezzNative. This module exposes runtime hooks for GPU-backed buffers and kernels. Real acceleration depends on the runtime build and the available backend. On builds without a GPU backend, runtime hooks may report unavailable or route callers through CPU fallback paths.
35 functions detected.
gui module: minimal immediate-mode GUI for freestanding targets Uses the Limine framebuffer when available (via os.fb_* accessors).
24 functions detected.
gui_win.tn — TezzNative host-mode framebuffer + input bridge v1.1 Pure extern fn declarations — no OS/sys/freestanding imports. All GUI apps import this as their low-level display layer.
29 functions detected.
intrin module: low-level intrinsics and explicit SIMD kernels Bit operations route directly to hardware builtins (POPCNT, BSF, BSR, BSWAP) for maximum performance. Pure-TN fallbacks are used only as documentation.
31 functions detected.
io module — TezzNative 2.0 Production I/O Capabilities: • Standard file open/read/write/seek/close (all modes) • BigFile: streaming GB/TB/PB files via configurable chunk reads • StreamWriter: buffered high-throughput sequential writes • MmapFile: memory-mapped file view (software or OS-backed) • PipePair: inter-process pipe (anonymous pipe) • Path helpers: join, base, dir, norm, portable + OS-backed • Directory helpers: walk, glob, list recursive • File utility: copy, move, size, exists, remove, rename • Async stubs: aio_read_req, aio_write_req, aio_wait
118 functions detected.
kernel module — TezzNative 2.0 OS Kernel Infrastructure Low-level kernel primitives for building operating systems, bare-metal programs, and hypervisors in TezzNative. Targets: x86_64 — full IDT, GDT, APIC, page tables aarch64 — exception vectors, MMU, GICv3 riscv64 — trap handler, PLIC, SBI interface Compile bare-metal: tezzc buildexe --target=x86_64-bare main.tn kernel.elf Usage: import "kernel" fn main() -> int: kernel.gdt_init() kernel.idt_init() kernel.pic_remap(0x20, 0x28) kernel.sti() kernel.vfs_mount("/", ramdisk_driver) while 1: kernel.hlt() ret 0
64 functions detected.
llm module — TezzLLM Production Inference Engine & Sampler GPT-style Transformer inference with KV-cache, INT8/INT4 quantization loaders, and state-of-the-art nucleus/top-k/temperature sampler. STRUCT-FREE SLAB ARCHITECTURE to ensure compatibility and performance.
12 functions detected.
Core SDK module.
37 functions detected.
math module — complete mathematical functions for TezzNative Maps to native runtime implementations for maximum performance.
55 functions detected.
ml module: unified AI/ML surface for TezzNative
97 functions detected.
Win32 Mmap Wrapper for TezzNative Used for instantly mapping massive .gguf AI model files into memory
7 functions detected.
Core SDK module.
9 functions detected.
net module: production network baseline for TezzNative. Scope in v1.0: - TCP + UDP socket wrappers - DNS endpoint helpers + URL utilities - TLS socket handle wrappers - HTTP/HTTPS convenience helpers (client + minimal server helpers) - WebSocket handshake + frame helpers - Native runtime-backed URL downloader Notes: - This module is the production baseline for app/service networking. - HTTP/2, QUIC, SMTP/IMAP, and full proxy stacks remain future milestones.
185 functions detected.
============================================================ nn.tn - TezzAI Neural Network Library v7.0 ============================================================ STRUCT-FREE ARCHITECTURE: The TezzNative compiler has severe bugs with structs (field offsets, pass-by-value corruption). Therefore, we use NO STRUCTS. A "NeuralNet" is simply a single *float slab pointer. SLAB slots (each slot = 8 bytes): [0] magic [1] n_layers [2] total_w [3] total_b [4..11] l_in_n[8] [12..19] l_out_n[8] [20..27] l_act[8] [28..35] l_w_off[8] [36..43] l_b_off[8] [44..] weights[total_w] [44+tw..] biases[total_b] [...+tb] outputs[total_b] [...+tb] deltas[total_b] [...+tb] grad_w[total_w] [...+tw] grad_b[total_b] ============================================================
31 functions detected.
npu module: experimental neural accelerator abstraction for TezzNative. This module exposes runtime hooks for ONNX/DirectML/CoreML/OpenVINO-style acceleration paths where the runtime was built with those backends. Callers must expect CPU/GPU fallback or "backend unavailable" results on platforms without a configured NPU runtime.
37 functions detected.
ocr module: Hindi-first OCR helpers (production baseline). Backend: - tesseract CLI (cross-platform) Notes: - This module provides deterministic command construction + extraction helpers. - For production OCR quality, install language data for Hindi (`hin`) and English (`eng`).
39 functions detected.
Core SDK module.
5 functions detected.
os module: freestanding helpers for OS/kernel targets This module is intentionally minimal and only depends on `sys`.
250 functions detected.
raspi module — TezzNative 2.0 Raspberry Pi Hardware Abstraction Layer Native Raspberry Pi support for all GPIO and peripheral access. Works on RPi 1/2/3/4/5 via /sys/class/gpio and /dev/* interfaces. Also supports RPi Pico (RP2040) via USB serial bridge. Compile for RPi: tezzc buildexe --target=aarch64-linux main.tn main Compile for RPi Pico: tezzc buildexe --target=arm-cortex-m0 main.tn main.uf2 GPIO: /sys/class/gpio (kernel sysfs) — no root required PWM: /sys/class/pwm (kernel pwm driver) I2C: /dev/i2c-* (i2c-dev kernel module) SPI: /dev/spidev* (spidev kernel module) UART: /dev/ttyS0 or /dev/ttyAMA0 Camera: libcamera or V4L2 via /dev/video0
66 functions detected.
simd module — TezzNative 2026 high-performance vector ops Width tiers: v4f_* — 4-wide f32 (SSE baseline, backward-compatible) v8f_* — 8-wide f32 (AVX2 tier, 2x throughput) v8i_* — 8-wide i32 AI kernels: relu, relu6, leaky, gelu_approx, sigmoid_approx, tanh_approx, fmadd Bulk helpers: map_relu, map_relu6, map_sigmoid, map_gelu, map_tanh Reductions: v8f_reduce_sum, v8f_reduce_max, v8f_reduce_min BLAS-style: dot_product, axpby, scale_inplace
55 functions detected.
std module: common prelude for TezzNative Import core libraries so projects can just `import "std"` as a baseline.
12 functions detected.
str module — comprehensive string utilities for TezzNative All functions return heap-allocated strings that must be free()'d, unless documented otherwise. Null/empty inputs are handled gracefully.
43 functions detected.
stt module — TezzNative 2.0 Native Speech-to-Text Engine Bundled Whisper-style inference engine for speech recognition. No OS API dependencies. Uses nn.tn for model inference. Architecture: 1. Audio capture from microphone (WAV input or raw PCM) 2. Mel spectrogram extraction (80-channel mel filterbank) 3. Log-mel feature normalization 4. Encoder: Conv + Transformer (via nn.tn) 5. Decoder: autoregressive token prediction 6. Token → text via tokenizer Usage: stt:*SttEngine = stt_new() stt_load_model(stt, "whisper-tiny.tnw") // TezzNative weight format text:str = stt_from_file(stt, "audio.wav") text2:str = stt_from_mic(stt, 5000) // record 5 seconds stt_free(stt)
18 functions detected.
sys module: freestanding ABI surface (no stdlib) NOTE: These are stubs/signatures for low-level targets. Backends/targets can map them to platform syscalls or kernel services.
12 functions detected.
task module: minimal async/await wrappers (native runs concurrently; VM runs synchronously)
8 functions detected.
tensor module: Advanced SIMD-accelerated math for AI and Neural Networks. This module provides the foundational core for building LLMs and deep learning frameworks (like TezzAI) on top of TezzNative. It leverages heavily unrolled, SIMD-optimized math kernels.
9 functions detected.
Core SDK module.
2 functions detected.
Core SDK module.
20 functions detected.
tezzapi module — TezzNative 2.0 Full Backend API Framework Production-grade HTTP REST API engine built on TezzNative networking. Supports: GET / POST / PUT / PATCH / DELETE / HEAD / OPTIONS Features: • Path parameters: /users/:id → api_param(req, "id") • Query string parsing: ?page=2&limit=50 • JSON request body parsing • File upload (multipart/form-data) • Middleware chain (pre/post hooks) • Response builder with status codes and headers • WebSocket upgrade handler • CORS helper • Rate limiting per IP • JWT-style bearer token validation • TNXB binary protocol (fast native clients)
126 functions detected.
tezzdb module — TezzNative 2.0 Native Database Engine TezzDB is a fully native, high-performance embedded database written entirely in TezzNative. No external dependencies. Architecture: • Page-based storage: 8192-byte (8KB) pages • B+ Tree index: all data in leaf pages, O(log n) lookup • Multiple tables per database file • BLOB-safe: stores raw byte data, JSON, or binary • Write-Ahead Log (WAL): append-only crash recovery log • ACID Transactions: begin/commit/rollback • Auto-increment primary keys • Secondary indexes: by any string column • Query: by PK, by indexed column, or full scan • Connection-style API: open/close/query/insert/update/delete • Native TezzNative UI bridge: JSON row format Page layout (8192 bytes): [0..3] page_type (u32 LE) [4..7] page_id (u32 LE) [8..11] next_page (u32 LE) — 0 = none [12..15] count (u32 LE) — keys/rows in this page [16..] payload Page types: 0 = DB_PAGE_FREE 1 = DB_PAGE_HEADER 2 = DB_PAGE_BTREE_INTERNAL 3 = DB_PAGE_BTREE_LEAF 4 = DB_PAGE_OVERFLOW
110 functions detected.
tezzdbql module — TezzNative 2.0 SQL-like Query Language TezzDBQL provides a SQL-inspired query interface on top of the native TezzDB B+ tree engine. Supported syntax (subset): SELECT * FROM table [WHERE col = ?] [LIMIT ?] INSERT INTO table (col1, col2, ...) VALUES (?, ?, ...) UPDATE table SET col1 = ? [WHERE id = ?] DELETE FROM table [WHERE id = ?] Parameterized queries use "?" placeholders. Results are accessed through a cursor-like QueryResult. Usage: import "../lib/tezzdb.tn" import "../lib/tezzdbql.tn" db:*char = db_open("mydb.db") db_table_create(db, "users") params:[str;4] params[0] = "alice" params[1] = "alice@example.com" r:*TzQueryResult = db_query(db, "INSERT INTO users (name, email) VALUES (?, ?)", ¶ms[0], 2) db_result_free(r) r2:*TzQueryResult = db_query(db, "SELECT * FROM users WHERE name = ?", ¶ms[0], 1) while db_result_next(r2) != 0: say cursor_field_str(r2, "name"), cursor_field_str(r2, "email") db_result_free(r2)
43 functions detected.
lib/tezzinstall.tn TezzNative Installer Framework v1.0 Create self-describing Windows installers entirely in TezzNative. Uses tezzui for the visual interface + PowerShell/Win32 for file operations. Usage example: import "tezzinstall" let cfg:TzInstall tezzinstall.install_set_name(&cfg, "MyApp") tezzinstall.install_set_version(&cfg, "1.0.0") tezzinstall.install_set_exe(&cfg, "MyApp.exe") tezzinstall.install_run(&cfg)
14 functions detected.
tezzserve module: production API server framework on top of TezzApi. Goals in v1.0: - Fast route registration helpers for API servers - Hardened HTTP session lifecycle wrappers - TNXB bridge endpoint helpers (HTTP body -> TNXB decode -> route dispatch)
64 functions detected.
tezzsetup module: production installer/uninstaller core logic for TezzNative. This module intentionally keeps the operational logic separate from GUI code, so we can validate install/uninstall behavior in headless CI and reuse it from Tk-style GUI frontends.
14 functions detected.
tezzspeech module: local TezzSpeech IPC protocol (no HTTP). Transport: - TCP loopback service (default 127.0.0.1:8097) - Binary framed protocol for low-latency request/response. Frame layout (12-byte header + payload): [0..3] magic "TZS1" [4] version (1) [5] op [6] status (response only; request uses 0) [7] reserved [8..11] payload_len (u32 little-endian) Payload for SPEAK: lang=<lang>\n voice=<voice>\n rate=<int>\n clone=<voice_ref_path>\n trace=<request_id>\n \n <text>
59 functions detected.
Core SDK module.
24 functions detected.
tezzui.tn — TezzNative Production UI Library v1.2 Immediate-mode widgets — no OS imports, pure gui_win bridge.
60 functions detected.
time module: sleep + time/date helpers
14 functions detected.
tkui module (deprecated): use tzui instead. Goals: - Keep app code short and readable (window/frame/label/button/entry) - Use dirty-region rendering by default via tzgui tree - Provide basic pointer + keyboard interaction for installer-style apps
30 functions detected.
tls module: OS-backed TLS/HTTPS helpers
17 functions detected.
Core SDK module.
26 functions detected.
tnui module: canonical retained GUI API for TezzNative. Thin wrapper over tzui so apps can migrate to `tnui` naming.
37 functions detected.
TezzNative eXchange (TNX): JSON-like data encoding for payloads and storage. Types: null, bool, int, float, string, array, object. Memory: all returned values/strings are heap-allocated; call tnx.release().
88 functions detected.
tokenizer module — TezzNative 2.0 Native BPE Tokenizer Byte-Pair Encoding tokenizer compatible with GPT-2/GPT-NeoX merges. Features: • Load vocab and merges from JSON files • Encode text → int array of token IDs • Decode token IDs → UTF-8 string • Byte-level fallback for unknown chars • Special tokens: <|endoftext|>, <pad>, <unk> • Efficient cache for repeated encodings • SentencePiece-style whitespace prefix • Token count (no allocation) for length estimation Usage: tok:*Tokenizer = tokenizer_load("vocab.json", "merges.txt") ids:*int = tokenizer_encode(tok, "Hello World!") n:int = tokenizer_last_encode_len(tok) text:str = tokenizer_decode(tok, ids, n) tokenizer_free(tok)
21 functions detected.
tsm module: TezzServiceManager (cross-platform service/process control scaffold). Registry format: TNX array of service objects. Service object keys: - name:str - cmd:str - cwd:str - autostart:int (0/1) - restart:int (0=never,1=always) - enabled:int (0/1)
29 functions detected.
tts module — TezzNative 2.0 Native Text-to-Speech Engine Bundled neural TTS inference — no OS API dependencies. Also provides lightweight rule-based fallback for fast speech. Architecture: 1. Text normalization (numbers, abbreviations, punctuation) 2. Phoneme conversion (letter-to-sound rules + exception dict) 3. Prosody: stress, intonation, duration models 4. Neural vocoder (Griffin-Lim or WORLD-style spectral synthesis) 5. WAV/PCM output to file or speaker via OS audio API Usage: tts:*TtsEngine = tts_new() tts_speak(tts, "Hello, world!") // play via speaker tts_speak_to_file(tts, "hi.wav", "Hello") // save WAV tts_set_voice(tts, "en-US-female") tts_set_rate(tts, 1.2) tts_set_pitch(tts, 0.9) tts_free(tts)
25 functions detected.
tzgui module: production-oriented, low-boilerplate GUI engine helpers. Built on top of core `gui` + `frame` primitives. Goals: - Easy app code (few calls to get a windowed UI) - Damage-aware redraw requests (apps mark what changed) - Deterministic behavior for freestanding/framebuffer targets
46 functions detected.
tzgui_native module — TezzNative 2.0 Host Native Windowing Backend Wraps GDI/Win32/Cocoa/X11 and provides unified cross-platform TzWindow, mouse, keyboard, and event loop.
6 functions detected.
tzimage: compact image kernels for TezzNative. Focus: simple RGB/RGBA image operations with low-overhead memory handling.
25 functions detected.
tznum: compact numeric kernels for TezzNative Focus: concise, NumPy-style core operations without runtime overhead.
40 functions detected.
tzui module: TzUI-style retained GUI wrapper over tzgui. Goals: - Keep app code short and readable (window/frame/label/button/entry) - Use dirty-region rendering by default via tzgui tree - Provide basic pointer + keyboard interaction for installer-style apps
48 functions detected.
vec module — type-erased dynamic array (growable slice) All elements have the same size (elem_size). Use unsafe blocks to read/write typed elements. Usage: v:*Vec = vec_new(sizeof(int)) val:int = 42 vec_push(v, &val as *char) got:int = 0 vec_get_copy(v, 0, &got as *char) vec_free(v)
34 functions detected.
wm module: compositor-style host window management lane. Features: - Multiple managed windows with z-order and focus. - Pointer-driven title-bar dragging. - Keyboard dispatch to focused window callbacks. - Explicit lifecycle operations (create/show/move/resize/remove).
28 functions detected.