Install a library once into your per-user libs folder — ~/.flaris/libs on macOS and Linux, %USERPROFILE%\.flaris\libs on Windows — and import it by name from any script, no --libs flag needed. (You can also just drop a .flx next to a script for one-off use.) Each library ships source and pre-compiled bytecode. Libraries marked --unsafe require the unsafe flag at runtime. Download the .fls source for inline documentation and usage examples.
Every library here is open source under the MIT licence and written in Flaris
itself — so they double as a substantial worked example of the language. Source, tests,
the FFI plugin shims and the documentation all live in
github.com/flaris-lang/flaris.
Contributions and new libraries are welcome.
AIWeb & NetworkOllama AI client - chat, streaming, JSON-mode, tool/function calling, vision input, embeddings, async, and model management. Requires a local Ollama server or an HTTP proxy for cloud endpoints.
ArgparseTooling & AsyncCommand-line argument parser in the style of Python's argparse - options, positionals, nargs, type conversion, choices, subcommands, mutually exclusive groups, and generated usage/help.
ConnectWeb & NetworkConnect RPC client (connectrpc.com) - gRPC-compatible unary calls over plain HTTP/1.1, so no HTTP/2, no HPACK and no ALPN. Client and server, binary or JSON codec, so a call can be reproduced with curl. Verified both directions against connect-go. Takes its method descriptors straight from a .proto loaded by Protobuf at runtime; maps the sixteen Connect/gRPC status codes both ways. Verified against connect-go.
DatetimeTooling & AsyncParse, format, compare, and do arithmetic on dates, times, and durations - including timezones and business-day arithmetic (holidays).
DeflateCompressionDEFLATE compression and decompression (RFC 1951) in pure Flaris, with zlib (RFC 1950) and gzip (RFC 1952) framing. Dynamic-Huffman encoder and table-driven decoder, both JIT-compiled. Classes: Inflate, Deflate.
GraphicsGraphics & Media2D software rasteriser written in Flaris - shapes, text, image compositing and PNG output, with a stateful stroke/fill/thickness context.
HttpWeb & NetworkHTTP/1.1 client - GET, POST, fiber-based async, cookie jar, multipart form builder, retry with backoff. Plain HTTP over TCP; add the Https library for TLS.
HttpsWeb & NetworkHTTPS client - injects a TLS byte-transport from the built-in Tls module (OS TLS stack: Secure Transport / OpenSSL / SChannel) into the Http engine, so all framing, chunked decoding, redirects, and cookies are shared. Certificate verification on by default. No --unsafe flag needed.
HttpServerWeb & NetworkHTTP/1.1 server written in Flaris on the Stream API - fiber per connection, keep-alive, chunked request bodies and streamed responses, routing with path params, static files. No --unsafe required.
HttpUtilWeb & NetworkHTTP wire parsing - URLs, query strings, form encoding, headers, chunked bodies and route patterns. Pure string work with no I/O except chunked decoding, which reads from a stream. No --unsafe required.
ModemWeb & NetworkAT-command transport and cellular modem control over a serial port. Two layers: AT owns line framing, prompts, OK/ERROR/+CME terminators, per-command timeouts and unsolicited result codes, so it drives anything that speaks AT; Modem owns 3GPP semantics - SIM and PIN state, signal, registration, operator, SMS and data contexts. Nothing raises: every call returns a result object with ok, and on failure an error plus an errorKind ("timeout", "port", "modem", "usage"), so a timeout is reported as a timeout rather than as a failure.
PngGraphics & MediaPNG encoder/decoder - every colour type and bit depth, all five filters, palette + tRNS. Adaptive row filtering makes files far smaller than a fixed filter.
ProtobufData & StorageProtocol Buffers (proto3): wire codec plus a .proto reader. Encodes and decodes ordinary class instances; or load a .proto at runtime and get the classes built for you - no codegen, no compiler. Scalars, repeated/packed, maps, oneof, nested and recursive messages, service/rpc descriptors, unknown-field passthrough, and the ten standard google/protobuf well-known types built in. Canonical proto3 JSON both ways, so a message written here reads in Go, Java or TypeScript. Verified against the Go protobuf runtime.
ZipCompressionZIP archives - read and write. Container (local headers, central directory, EOCD) built in Flaris; entry payloads use the built-in Compress DEFLATE codec. Interoperates with standard ZIP tools. Classes: Archive, ZipReader, ZipWriter.