Complete API reference for the Vais standard library
Most standard library modules are self-contained Vais code that compiles directly. Some modules require additional setup:
| Category | Modules | Requirement |
| C Runtime | HTTP, HTTP Client/Server, WebSocket, Log, ORM, Sync, Thread, Template, Contract | Link corresponding *_runtime.c file |
| External Libraries | Postgres (-lpq), TLS (-lssl -lcrypto), Compress (-lz), SQLite (-lsqlite3) | System library installation |
| GPU | GPU | --gpu cuda flag + gpu_runtime.c |
| SIMD | SIMD | Platform-specific intrinsics + simd_runtime.c |
| WASM-only | WASM, WASI P2, Web | --target wasm32-unknown-unknown or --target wasm32-wasi |
Modules not listed above (Core Types, Collections, Math, IO, etc.) compile standalone without additional dependencies.
| Module | Description |
| Option | Optional value type (Some(T) / None) |
| Result | Error handling type (Ok(i64) / Err(i64)) |
| String | Heap-allocated dynamic string |
| OwnedString | Owned string with lifecycle management |
| ByteBuffer | Growable byte buffer for binary I/O |
| Box | Heap-allocated single-ownership pointer |
| Rc | Reference-counted smart pointer |
| Module | Description |
| Vec | Dynamic growable array |
| HashMap | Hash table with generic keys and values |
| StringMap | Hash table with string keys |
| BTreeMap | Self-balancing ordered map (B-tree) |
| Set | Hash-based set collection |
| Deque | Double-ended queue (circular buffer) |
| PriorityQueue | Min-heap priority queue |
| Collections | Unified re-export of all collections |
| Module | Description |
| IO | Standard input/output operations |
| File | File I/O with memory mapping and locks |
| Filesystem | POSIX filesystem operations |
| Fmt | String formatting and number conversion |
| Module | Description |
| Net | TCP/UDP socket networking (IPv4/IPv6) |
| HTTP | HTTP protocol constants and types |
| HTTP Client | HTTP client with request/response |
| HTTP Server | HTTP server framework with routing |
| WebSocket | WebSocket protocol (RFC 6455) |
| TLS | TLS/SSL via OpenSSL/LibreSSL |
| URL | URL parsing and manipulation |
| Module | Description |
| Thread | OS-level threading and thread pools |
| Sync | Mutex, RwLock, Channel, atomics |
| Future | Future trait and combinators |
| Async | Async utilities (timeout, retry, race) |
| Runtime | Async task executor |
| AsyncReactor | Platform event loop (kqueue/epoll) |
| Module | Description |
| JSON | JSON parser and generator |
| Regex | Regular expression matching |
| Base64 | Base64 encoding/decoding |
| Template | Template engine with variable interpolation |
| Module | Description |
| SQLite | SQLite3 database bindings |
| Postgres | PostgreSQL client (libpq) |
| ORM | Lightweight object-relational mapping |
| Module | Description |
| Math | Mathematical functions and constants |
| Hash | Hash functions for collections |
| Random | Pseudo-random number generation |
| UUID | UUID v4 generation and parsing |
| CRC32 | CRC32 checksum computation |
| Module | Description |
| Crypto | SHA-256, HMAC, AES-256 |
| Compress | Gzip/deflate compression (zlib) |
| Log | Structured logging with JSON output |
| Module | Description |
| Memory | Low-level memory operations |
| Allocator | Custom allocator traits |
| Arena | Arena (region) allocator |
| GC | Optional garbage collector |
| Module | Description |
| Time | Time measurement, sleep, Duration |
| Profiler | Runtime performance profiling |
| Test | Built-in test framework |
| PropTest | Property-based testing |
| Contract | Design-by-contract support |
| GPU | GPU compute (CUDA/Metal) |
| HotReload | Hot reloading support |
| DynLoad | Dynamic module loading |