1
0
Fork 0
forked from fun/fun

Added LibreSSL as an alternative to OpenSSL. Needs more testing! (0.38.16)

This commit is contained in:
Johannes Findeisen 2026-02-19 23:33:00 +01:00
commit 3e0d47a268
35 changed files with 677 additions and 38 deletions

View file

@ -80,7 +80,7 @@ The interpreter loop lives in src/vm.c: vm_run. Opcodes are executed in a tight
Opcode handlers organization:
- To keep vm.c readable, most opcode implementations are factored into small .c files included directly into vm.c (e.g., vm/core/load_const.c, vm/logic/and.c, vm/arrays/push.c, vm/math/abs.c, vm/os/thread_spawn.c, etc.).
- This is a deliberate “amalgamation” style: small singlepurpose C units compiled as part of vm.c.
- Optional subsystems (JSON, PCRE2, CURL, SQLite, libSQL, PC/SC, XML2, Tcl/Tk, Notcurses, INI, sockets, serial, OS helpers) are grouped under src/external and src/vm/<domain>/.
- Optional subsystems (JSON, PCRE2, CURL, SQLite, libSQL, PC/SC, XML2, Tcl/Tk, Notcurses, INI, OpenSSL/LibreSSL crypto helpers, sockets, serial, OS helpers) are grouped under src/external and src/vm/<domain>/.
Dispatch naming and visibility:
- Humanreadable names for opcodes live in vm.h: opcode_names[]. These are used in debug prints and error messages.
@ -117,7 +117,7 @@ The VM is dynamically typed. Values carry a tag; operations check types at runti
- Maps: OP_MAKE_MAP/KEYS/VALUES/HAS_KEY.
- Conversions/reflection: OP_TO_NUMBER/TO_STRING/CAST/TYPEOF, OP_UCLAMP/SCLAMP.
- I/O and OS: OP_READ_FILE/WRITE_FILE/INPUT_LINE/ENV/PROC_RUN/PROC_SYSTEM/TIME_NOW_MS/CLOCK_MONO_MS/DATE_FORMAT/OS_LIST_DIR/RANDOM_NUMBER, sockets, serial.
- External integrations (optional): JSON, CURL, SQLite, libSQL, PC/SC, XML2, Tcl/Tk, Notcurses, INI.
- External integrations (optional): JSON, CURL, SQLite, libSQL, PC/SC, XML2, Tcl/Tk, Notcurses, INI, OpenSSL/LibreSSL.
Each handler enforces argument types and returns clear error messages via vm_raise_error on misuse.