Getting Started
The shortest reliable path from zero to a running gof program.
Choose your starting point
If you want the latest released toolchain:
Unix-like systems:
curl -fsSL https://raw.githubusercontent.com/GofMan5/gof-lang/main/scripts/install.sh | bashWindows PowerShell:
irm https://raw.githubusercontent.com/GofMan5/gof-lang/main/scripts/install.ps1 | iexThis is the right path if you want to try the language as a user.
If you are developing the language itself or want the freshest bootstrap state:
cargo run -q -p gof-cli --bin gof -- run examples/hello_print.gofThis is the right path if you want to inspect compiler behavior, examples, and tests.
If you only want to write and run gof programs, do not stay on the Rust path.
Install gof, put it on PATH, and use the normal CLI directly.
Your first program
Write this:
fn main() -> int:
print("hello from gof")
return 42Save it as hello.gof and run:
gof run hello.gofWhat happens
print("hello from gof")writes text to standard outputreturn 42becomes the final displayed program value in the bootstrap CLI path
That split is intentional. print is side effect. return is program result.
The first commands you should actually know
Format a file:
gof fmt hello.gofCheck whether formatting is already correct:
gof fmt hello.gof --checkRun the fixture suite:
gof test tests/fixturesBuild the backend artifact:
gof build hello.gofBuild a bootstrap-native executable:
gof build hello.gof --nativeIf you are hacking on gof from the repository before installing it, prefix the
same commands with:
cargo run -q -p gof-cli --bin gof --Understand the two build modes correctly
This is one of the easiest places to learn the wrong thing, so be precise:
gof runexecutes through the bootstrap evaluatorgof buildemits the structured backend artifact by defaultgof build --nativeemits a real host executable
--native is still a bootstrap-native path. It does not mean the project already
has final direct code generation.
That distinction matters because the language is intentionally being honest about its stage.
A good first study sequence
After you can gof run any example:
- read the Language Tour to build the mental model
- explore Types and Data for the current type surface
- follow Control Flow for branching, matching, and error propagation
- visit Concurrency when you are ready for tasks, channels, and
select - check Testing for the shipped testing platform baseline
- use the
examples/folder as a working reference for real programs