The file
fox/example$ cat hello.fox
#include "hello.h"
main(){
"
Total $(args.map_len()) command line arguments
those are $args
".px()
name=:Habib
msg="hello, $name!"
msg.px()
myvector=[:hello, :world]
myvector.px()
mymap={name: :Habib, age: 23}
mymap.name=:Ibrahim
mymap.px()
---
Drawing a box, $name!
|---------|
| |
| |
|---------|
---.px()
return 0
}
Compiled as static
fox/example$ fox cc hello.fox hello --profile=static
-> hello.c
-> hello.h
gcc hello.c -o hello -lfoxstatic -lfoxcmdstatic -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -Wno-unused-command-line-argument -fdata-sections -ffunction-sections -Wl,-dead_strip -std=gnu99 -Wno-logical-op-parentheses -lm 2>&1
/fox/example$
Size, 30KB.
fox/example$ ll hello
-rwxr-xr-x 1 habib wheel 29420 Dec 6 00:37 hello
Dependence, only system.
fox/example$ otool -L hello
hello:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)