docs / start
fx · 0.7.1
Start here
Welcome to fx: a systems language with visible memory and dual emission to readable C.
What you need
- The fxlang package (compiler in
bin/, plusstd/, scaffolds, headers). - A C toolchain on your
PATHfor linking.gccis the default today. - Windows or Linux x86_64 for the prebuilt compiler in this release.
No other language toolchain is required to write and run fx programs.
fx doctor
Five-minute hello
fx version # expect v0.7.1
fx new hello
cd hello
fx run main.fx # expect exit code 42
Windows without PATH
.\bin\fx.exe doctor
.\bin\fx.exe new hello
cd hello
..\bin\fx.exe run main.fx
Linux without PATH
./bin/fx doctor
./bin/fx new hello
cd hello
../bin/fx run main.fx
What just happened?
fx new wrote a simple scaffold: a named region,
effects { alloc, mut }, and import std/vec.
That is the recommended starting point: Go-feel lifetimes, not a GC.
fx new tiny --scaffold minimal
fx new firmware --scaffold embedded
Linking notes
When fx run or fx build links:
- Include path:
zspec/include/ - Library:
build/gcc/libzspec.a(Windows) orbuild/gcc-linux/libzspec.a(Linux)
If linking fails with “gcc not found,” install a C compiler and run fx doctor again.