Skip to content
FutureBlitz

    Install

    Tools

    fb run

    Compiles a program and runs it.

    fb run [options] [file.fb | package folder] [-- <arguments>]

    fb run builds a program as fb build does, and runs it. With no file or folder, it works on the package the current folder is in: the nearest folder, from the current one up, with a project.toml. What follows -- goes to the program as its command line. fb exits with the program’s exit code; a program that panics exits with 101, and fb says so.

    Options

    Option
    --releaseOptimizes, and lets integer overflow wrap instead of panicking
    --show <stages>Prints what the compiler made at each stage: tokens, ast, types, mir, llvm, or all
    --offlineUses only the registry packages in the cache
    --color <when>Colors the output: auto, always, or never

    Examples

    fb run
    fb run --release
    fb run -- --top 3 notes.txt
    fb run scripts/rename.fb -- photos/

    A panic prints where it happened, and the calls that led there:

    panic: index 5 is out of range for 3 elements at main.fb:12:17
        at Pick (main.fb:12)
        at top-level code (main.fb:20)
    error: report exited with code 101, which a panic gives

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