3.6 KiB
| layout | published | noToc | noComments | noDate | title | subtitle | description | permalink | lang | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| page | true | false | false | false | Fun - Standard Library Overview | Overview of the standard library modules under ./lib with one-line summaries. | Overview of the standard library modules under ./lib with one-line summaries. | /documentation/stdlib/ | en |
|
This page provides a quick orientation to the standard library located under https://git.xw3.org/fun/fun/src/branch/main/lib{:class="git"}.
The stdlib is written in Fun and organized by domain. Below is the current layout with brief notes. Refer to the source for full APIs and examples.
Top-level modules
arrays.fun— helpers for working with array structures.cli.fun— minimal helpers for building CLI tools.hello.fun— simple demonstration helper(s).hex.fun— hexadecimal encode/decode helpers.math.fun— math helpers in Fun.regex.fun— simple regex-related helpers (see alsoregex/).strings.fun— string manipulation utilities.
Packages
-
crypt/— cryptographic primitives and hashes. See https://git.xw3.org/fun/fun/src/branch/main/lib/crypt/{:class="git"}.aes256.funcrc32.fun,crc32c.funmd5.fun,md5_legacy.funripemd160.fun,ripemd160_new_try.funsha1.fun,sha256.fun,sha384.fun,sha512.fun
-
encoding/— text/binary encodings and conversions. See https://git.xw3.org/fun/fun/src/branch/main/lib/encoding/{:class="git"}.base64.fun
-
io/— input/output utilities and system interfaces. See https://git.xw3.org/fun/fun/src/branch/main/lib/io/{:class="git"}.console.fun— console I/O helpersini.fun— INI parse helpersjson.fun— JSON helperspcsc.fun,pcsc2.fun— smart card access (PC/SC)process.fun— spawn and manage subprocessesserial.fun— serial port helperssocket.fun— socket convenience wrappersthread.fun— simple threading utilitiesxml.fun— XML helpers
-
net/— networking helpers and example HTTP servers. See https://git.xw3.org/fun/fun/src/branch/main/lib/net/{:class="git"}.cgi.fun— basic CGI helpershttp_server.fun— blocking HTTP serverhttp_cgi_server.fun— HTTP server that can execute .fun CGI fileshttp_cgi_lib_server.fun— variant of the HTTP CGI server using the stdlib
-
regex/— regular expression utilities (PCRE2-based when available). See https://git.xw3.org/fun/fun/src/branch/main/lib/regex/{:class="git"}.pcre2.fun
-
utils/— small reusable helpers and functional utilities. See https://git.xw3.org/fun/fun/src/branch/main/lib/utils/{:class="git"}.datetime.funmatch.funmath.funoption.funrange.funresult.fun
Note: Availability of some modules can depend on optional extensions selected at build time (see ../build/). For instance, regex/pcre2.fun requires PCRE2 support; ui/* depends on chosen UI backends.
Using modules
#include <strings.fun
s = trim(" hello ")
print(s)
For search paths and namespacing details, see ../includes/ and ../cli/ (FUN_LIB_DIR and DEFAULT_LIB_DIR).