About libfawk

Libfawk is a very small, reentrant, portable (pure C89) library that implements the fawk Virtual Machine (VM) for executing scritps. The implementation is very small (less than 1700 sloc) and as an option shipped as a single-file dependency-free .c source (with or without language compilers appended) that is very easy to integrate in any project. Libfawk is reentrant, which means multiple independent script contexts can exist and be used in parallel without having to use processes or threads. Libfawk has the following scripting langauge options available:

The compacted single-source version of each parser is less than 1000 sloc.

Small size allows users to learn each language in an hour using the tutorials: the fawk tutorial.

Small size in numbers:
library version (#include from /usr/include, link)
component edit lib size raw lib size remarks
VM 1750 data sheet , builtins, security
fawk 400 1600 data sheet , tutorial
fbas 600 1700 data sheet , tutorial
fpas 500 1600 data sheet , tutorial
 
single source, modular (#include vm then #include language(s))
component sc size source file
VM 1750 libfawk_sc_vm/libfawk_sc_vm.c
fawk 850 libfawk_sc_vm/libfawk_sc_fawk.c
fbas 950 libfawk_sc_vm/libfawk_sc_fpas.c
fpas 850 libfawk_sc_vm/libfawk_sc_fbas.c
 
single source, combined versions (#include only 1 file)
component sc size source file
VM+fawk 2500 libfawk_sc_fawk/libfawk_sc_fawk.c
VM+fbas 2600 libfawk_sc_fbas/libfawk_sc_fbas.c
VM+fpas 2500 libfawk_sc_fpas/libfawk_sc_fpas.c
VM+fawk+fbas+fpas 4100 libfawk_sc_all/libfawk_sc_all.c

Legend:

Current state

Preparing for the first release. API is unstable yet.

Focus

Libfawk tries to be small, portable and usable for developing bigger scripts within a host applications. It does not try to be:

For more info on why I wanted a new scripting language, please visit the FAQ.