Some documentation updates for stdlib. No code changes. (0.39.12)
This commit is contained in:
parent
6bca506c6f
commit
76de6278f2
1 changed files with 55 additions and 12 deletions
|
|
@ -2,24 +2,67 @@
|
||||||
|
|
||||||
This page provides a quick orientation to the standard library located under [`./lib/`](../lib/).
|
This page provides a quick orientation to the standard library located under [`./lib/`](../lib/).
|
||||||
|
|
||||||
The stdlib is written in Fun and organized by domain. Below are top-level modules and what they generally cover. Refer to the source for full APIs and examples.
|
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.
|
||||||
|
|
||||||
## Module index (selected)
|
## Top-level modules
|
||||||
- `crypt/` - cryptographic helpers (hashing, encoding helpers). See also [lib/crypt](../lib/crypt/).
|
- `arrays.fun` — helpers for working with array structures.
|
||||||
- `encoding/` - text/binary encodings and conversions.
|
- `cli.fun` — minimal helpers for building CLI tools.
|
||||||
- `io/` - file and stream utilities.
|
- `hello.fun` — simple demonstration helper(s).
|
||||||
- `net/` - basic networking helpers.
|
- `hex.fun` — hexadecimal encode/decode helpers.
|
||||||
- `regex/` - regular expression utilities (PCRE2 when available).
|
- `math.fun` — math helpers in Fun.
|
||||||
- `ui/` - UI helpers (e.g., Tk if enabled at build time).
|
- `regex.fun` — simple regex-related helpers (see also `regex/`).
|
||||||
- `utils/` - small reusable helpers and utilities.
|
- `strings.fun` — string manipulation utilities.
|
||||||
|
|
||||||
Note: Availability of some modules can depend on optional extensions selected at build time (see [build.md](./build.md)).
|
## Packages
|
||||||
|
- `crypt/` — cryptographic primitives and hashes. See [lib/crypt](../lib/crypt/).
|
||||||
|
- `aes256.fun`
|
||||||
|
- `crc32.fun`, `crc32c.fun`
|
||||||
|
- `md5.fun`, `md5_legacy.fun`
|
||||||
|
- `ripemd160.fun`, `ripemd160_new_try.fun`
|
||||||
|
- `sha1.fun`, `sha256.fun`, `sha384.fun`, `sha512.fun`
|
||||||
|
|
||||||
|
- `encoding/` — text/binary encodings and conversions. See [lib/encoding](../lib/encoding/).
|
||||||
|
- `base64.fun`
|
||||||
|
|
||||||
|
- `io/` — input/output utilities and system interfaces. See [lib/io](../lib/io/).
|
||||||
|
- `console.fun` — console I/O helpers
|
||||||
|
- `ini.fun` — INI parse helpers
|
||||||
|
- `json.fun` — JSON helpers
|
||||||
|
- `pcsc.fun`, `pcsc2.fun` — smart card access (PC/SC)
|
||||||
|
- `process.fun` — spawn and manage subprocesses
|
||||||
|
- `serial.fun` — serial port helpers
|
||||||
|
- `socket.fun` — socket convenience wrappers
|
||||||
|
- `thread.fun` — simple threading utilities
|
||||||
|
- `xml.fun` — XML helpers
|
||||||
|
|
||||||
|
- `net/` — networking helpers and example HTTP servers. See [lib/net](../lib/net/).
|
||||||
|
- `cgi.fun` — basic CGI helpers
|
||||||
|
- `http_server.fun` — blocking HTTP server
|
||||||
|
- `http_cgi_server.fun` — HTTP server that can execute .fun CGI files
|
||||||
|
- `http_cgi_lib_server.fun` — variant of the HTTP CGI server using the stdlib
|
||||||
|
|
||||||
|
- `regex/` — regular expression utilities (PCRE2-based when available). See [lib/regex](../lib/regex/).
|
||||||
|
- `pcre2.fun`
|
||||||
|
|
||||||
|
- `ui/` — user interface helpers (built if the corresponding extensions are enabled). See [lib/ui](../lib/ui/).
|
||||||
|
- `notcurses.fun`
|
||||||
|
- `tk.fun`
|
||||||
|
|
||||||
|
- `utils/` — small reusable helpers and functional utilities. See [lib/utils](../lib/utils/).
|
||||||
|
- `datetime.fun`
|
||||||
|
- `match.fun`
|
||||||
|
- `math.fun`
|
||||||
|
- `option.fun`
|
||||||
|
- `range.fun`
|
||||||
|
- `result.fun`
|
||||||
|
|
||||||
|
Note: Availability of some modules can depend on optional extensions selected at build time (see [build.md](./build.md)). For instance, `regex/pcre2.fun` requires PCRE2 support; `ui/*` depends on chosen UI backends.
|
||||||
|
|
||||||
## Using modules
|
## Using modules
|
||||||
```fun
|
```fun
|
||||||
include "utils/strings.fun" as strings
|
#include <strings.fun>
|
||||||
|
|
||||||
let s = strings.trim(" hello ")
|
let s = trim(" hello ")
|
||||||
print(s)
|
print(s)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue