Libraries
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.
Browse the open source on GitHub ↗
--unsafe flag needed.
--unsafe required.
--unsafe required.
/dev/i2c-N): register reads and writes with explicit byte order, raw transfers with a repeated start, and a bus scan. Nothing raises: a failed call returns nil or false and ErrorKind() names the cause ("nack", "bus", "permission", "busy", "tool", ...), with the fix in Error(). Runs through i2c-tools, so no --unsafe; a simulated chip can be plugged in to work without hardware.
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.
openapi.json, a self-contained Swagger-UI-style explorer with "Try it out", request validation middleware, schema learning from live traffic and a spec-driven contract check.
--unsafe.
pg_ffi.c and --unsafe flag.
redis_ffi.c and --unsafe flag.
--unsafe.
--unsafe flag.
/dev/spidevB.C): full-duplex transfers with mode, clock rate, word size and bit order set per device. Nothing raises: a failed call returns nil and ErrorKind() names the cause ("bus", "permission", "config", "tool", ...), with the fix in Error(). Runs through spi-tools, so no --unsafe; a simulated chip can be plugged in to work without hardware.
sqlite_ffi.c and --unsafe flag.
ssh-ed25519 host keys pinned like known_hosts, the ChaCha20-Poly1305 cipher, password and Ed25519 public-key authentication, and a session channel per command that returns stdout, stderr and the exit status. Nothing raises.
--unsafe flag.
No library matches . Try a broader term, or .