Vex Standard Library
The Vex Standard Library (std) provides a set of highly optimized, parallelism-first modules to help you build fast, reliable systems. It is written completely in Vex, making use of Vex's powerful Memory Management (VUMM), Tensor / Vectorization types, and compiler-level built-ins to extract maximum performance from the CPU and GPU.
Core Modules
| Module | Description |
|---|---|
bit | Bitwise manipulation, population counts, masking, leading/trailing zero counts mapped directly to hardware vector intrinsics. |
cli | Subcommand, argument, and flag parsing utilities for rapid CLI application development. |
compress | Pure Vex DEFLATE and GZIP compression and decompression paths optimized for the vectorizer. |
crypto | Core cryptographic algorithms and checksums (e.g. CRC32, AES, MD5) leveraging crypto SIMD instructions (AES-NI) with software fallbacks. |
db | Database connections, async pooling, and Native PostgreSQL bindings written purely in Vex without C driver dependencies. |
fs | Buffered asynchronous and synchronous File System operations integrated into the Vex M:N scheduler. |
hash | Extremely fast, non-cryptographic hashing algorithms (FNV-1a, xxHash3, WyHash) optimized for Hash Maps and general probing. |
http | Zero-allocation HTTP/1.1 Protocol parsers and baseline Web Server constructs. |
inference | LLM specific primitive abstractions. Holds logic for RoPE, K/V Cache, and Hardware quantizations. |
io | Basic cross-platform I/O streams and file descriptors. |
math | Math operations ranging from basic arithmetic to advanced trigonometry. Built with GPU graph fn infrastructure for bulk operations. |
ml | High performance Neural Network blocks (RMSNorm, Softmax) executed via Graph blocks. |
net | Asynchronous TCP/UDP networking sockets mapped natively to the Vex M:N scheduler loop. |
regex | SIMD-Accelerated zero-copy regex engine compiling to bytecode NFAs. |
semver | Semantic Versioning definitions and query engines. |
serde | A powerful, zero-copy serialization/deserialization framework supporting JSON, TOML, CSV, and MessagePack formats. |
strings | String building utilities centered on StringBuilder. |
time | Instant OS monotonic hardware clocks without GC pauses. |
unicode | Unicode character properties, case folding, and character matching. Powered by binary-searched precompiled tables. |
url | Extremely fast, WHATWG-compliant URL parsing and encoding, designed to aggressively reduce small allocations. |
Philosophy
The Vex Standard Library follows a few central design pillars:
- Zero-Copy & Low Allocation: Functions prefer slices (
Span<T>), byte buffers (RawBuf), and minimal heap allocations. - "Silicon-Ready" Operations: Wherever there are SIMD instructions or potential for parallelism (hashes, loops, string escapes), the
stdstructures it sovex-compilercan vectorize it directly. - Extensibility: Things like
Serdeare abstracted viacontracts, bringing familiar ergonomic usage to a completely custom systems stack.