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

  1. The fxlang package (compiler in bin/, plus std/, scaffolds, headers).
  2. A C toolchain on your PATH for linking. gcc is the default today.
  3. 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:

If linking fails with “gcc not found,” install a C compiler and run fx doctor again.

Next: Language · Regions · CLI