Skip to content
FutureBlitz

    Install

    Guide

    Release builds and shipping

    Debug and release builds, what an executable needs beside it, stack traces, licenses, and formatting.

    A FutureBlitz program builds into one native executable, with the runtime and the C libraries it uses linked in statically. Shipping it is copying that file.

    Debug and release

    fb build and fb run make a debug build: integer overflow and shifts out of range panic where they happen, and it has full debug info, DWARF on Linux and macOS and CodeView on Windows, for a debugger. --release optimizes, lets overflow wrap, and keeps line tables.

    fb build --release

    A package’s executable goes in its build/ folder, named after the package, or where -o says.

    What it needs

    • Windows: nothing beyond Windows 10 or newer. MinGW’s runtime links in statically.
    • Linux: a glibc of 2.28 or newer, which every distribution since about 2018 has: RHEL 8, Ubuntu 20.04, and Debian 10. Programs link against glibc 2.28’s stubs, which fb ships, and libstdc++ and libgcc link in statically.
    • macOS: the macOS that fb runs on; building needs Apple’s Command Line Tools, for the SDK.

    A [native] library that’s dynamic, and a library a program’s project.toml builds beside it, go beside the executable; every static one is inside it.

    Crashes name their lines

    Every executable, debug or release, has a table fb writes of where each call is, by FutureBlitz’s own names, files, and lines, so a panic on a player’s machine prints a stack trace that says where, without any debug files shipped:

    panic: index 5 is out of range for 3 elements at game.fb:12:17
        at Counter.Take (game.fb:12)
        at Apply<Counter> (game.fb:17)
        at Run (game.fb:22)
        at top-level code (game.fb:25)

    Licenses

    After a build that links any of std’s bundled C libraries, fb says which ones, under which licenses, and where their notice files are. Shipping those notices with the program is the programmer’s job, as each license asks.

    Formatting

    fb fmt formats a package’s .fb files in std’s own style, and fb fmt --check lists those it would change, for CI. It only changes spacing and where long lines break, so code means what it did, and the only setting is the line width, [format] width in project.toml, 100 without it.

    Debugging

    The VS Code extension builds a debug build and debugs it through CodeLLDB on every OS, with FutureBlitz’s Strings, arrays, Maps, nullables, and Classes shown as their values.

    Report an issue with this page or with FutureBlitz on GitHub.