Re: Factor

Factor: the language, the theory, and the practice.

Factor on FreeBSD

Tuesday, November 3, 2026

#unix

Factor had FreeBSD support some time ago but it suffered from bit rot. Generally, platforms benefit from regular attention and upkeep as versions change. Recently, we have been improving our FreeBSD support, filling in missing library backends, and adding a GitHub Actions job to keep building and testing it.

If you use FreeBSD, this is a good time to try Factor!

Continuous integration

Our build workflow now uses vmactions/freebsd-vm to run Factor inside a FreeBSD virtual machine. We are currently testing on FreeBSD 15.1 on amd64 (x86-64). The workflow uses the action’s default FreeBSD release, so that version can change as the action is updated.

On pushes and pull requests to master, the FreeBSD job installs the build dependencies, bootstraps Factor, loads all vocabularies while checking for compiler errors, runs the core, compiler, thread, and I/O tests, and lints the documentation in core, basis, and extra.

Having this in CI gives us a regular check on changes that might otherwise break a less frequently used platform. It also helped uncover some test assumptions around FIFOs, TLS, and kqueue registration, which we have since fixed.

Note: this is separate from our build farm that we use for nightly releases. That does not yet have a FreeBSD instance running.

Library improvements

Several recent changes make Factor more useful on FreeBSD:

  • Filesystem monitoring. The io.monitors.freebsd backend now uses kqueue vnode watches to report file additions, modifications, and removals. It handles files replaced during editor saves and cleans up monitors when watched directories are moved or removed.
  • Desktop integration. GTK platform declarations now include the BSD platforms. The GTK file picker backends are shared through file-picker.unix, making the open and save dialogs available on FreeBSD.
  • Processes and login records. There is now a FreeBSD backend for tools.ps, along with unix.utmpx bindings and conversion of FreeBSD login records.
  • Terminal tools. The terminal vocabulary can detect the terminal size on FreeBSD, and tldr knows to request FreeBSD command examples.
  • Shared Unix backends. FreeBSD now uses the Unix privilege elevation backend, and the Festival text-to-speech backend is shared across Unix platforms.

We have also added a freebsd-arm-64 VM build target. The ARM CI job is currently disabled, so amd64 is the architecture receiving regular CI coverage. Reports from people trying ARM64 would be particularly useful.

Try it out

These changes are on the development branch. To build from source on a FreeBSD machine, first install Git, Bash, and sudo as root:

pkg install git bash sudo

Then clone the repository, install the build dependencies, and bootstrap:

git clone https://github.com/factor/factor.git
cd factor
./build.sh deps-pkg
./build.sh net-bootstrap

The dependency installer uses sudo, so your account will need permission to install packages.

For a terminal listener, run:

./factor -run=listener

On a desktop with a working graphical session, run ./factor to start the UI. The development branch uses GTK4 by default, and the dependency installer includes GTK4 and libepoxy. GTK4 supports X11 and Wayland; you can select one explicitly with GDK_BACKEND=x11 or GDK_BACKEND=wayland.

Please give it a try on your FreeBSD setup!

We would love to hear what works, whether you are using the listener, the graphical tools, or building an application. If something fails, open an issue with your FreeBSD version, CPU architecture, Factor commit, and the steps and error output needed to reproduce it. Results from other FreeBSD versions and hardware will help us improve support beyond the CI machine.