Skip to content

Docs/Toolchain/Watch Mode

Watch Mode

Save a file and the program is rebuilt, the changed functions reported, and the program run again.

~1 min read

On this page

Usage

fidesc watch main.fd

On each save, watch rebuilds the program as a native Linux executable, reports which functions were added, changed or removed, and runs it again in a new process. Output appears when the program exits; a compile error is printed and the last good build is kept.

Current scope

  • Rebuild and restart, not hot patching. Code is not swapped into a running process, and globals start fresh on every run.
  • fidesc on Linux only. fidesc is the frozen Rust compiler, so programs that use features new in fid may not build under watch. fid watch is not implemented yet (the command name currently runs bench).
  • The optimizer is off unless you pass --opt.

Report an issue