{"id":26985,"library":"fbuild","title":"fbuild","description":"A platform-agnostic embedded build tool compatible with PlatformIO projects. Version 2.2.3 is the latest stable release. The project is actively maintained with a Rust core and Python CLI. Release cadence is irregular; check GitHub for updates.","status":"active","version":"2.2.3","language":"python","source_language":"en","source_url":"https://github.com/fmitchell/fbuild","tags":["embedded","build-system","platformio","rust","cli"],"install":[{"cmd":"pip install fbuild","lang":"bash","label":"pip install from PyPI"}],"dependencies":[{"reason":"Required for PlatformIO project compatibility when using fbuild with PlatformIO platforms","package":"platformio","optional":true}],"imports":[{"note":"One common mistake is importing from the module path incorrectly. fbuild exposes FBuild at the top level.","wrong":"from fbuild.fbuild import FBuild","symbol":"FBuild","correct":"from fbuild import FBuild"},{"note":"FBuildConfig is a top-level symbol, not inside a config submodule.","wrong":"import fbuild.config","symbol":"FBuildConfig","correct":"from fbuild import FBuildConfig"},{"note":"run_build is a top-level function, not a module-level function.","wrong":"import fbuild; fbuild.run_build()","symbol":"fbuild.run_build","correct":"from fbuild import run_build"}],"quickstart":{"code":"from fbuild import FBuild, FBuildConfig\n\nconfig = FBuildConfig(\n    project_dir='./my_project',\n    board='arduino_uno',\n    platform='atmelavr'\n)\n\nbuilder = FBuild(config)\nresult = builder.build()\nprint('Build succeeded:', result.success)","lang":"python","description":"Basic usage: configure and run an embedded build. Adjust board and platform to match your project."},"warnings":[{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.11+ requirement: fbuild 2.x requires Python >=3.10. Earlier Python versions (3.8, 3.9) are not supported.","severity":"breaking","affected_versions":"2.0.0 and later"},{"fix":"Use the standard platform: `win` or `linux` with appropriate config. Or switch to a different build system for freestanding targets.","message":"The `win_freestanding` and `linux_freestanding` platforms have been removed from fbuild 2.x. They were previously used for generating freestanding binaries.","severity":"deprecated","affected_versions":"2.0.0+"},{"fix":"Install a compiler (e.g., MinGW or MSVC) and ensure it's accessible.","message":"When using fbuild on Windows, make sure your build tools (like GCC or MSVC) are available in PATH. fbuild does not install compilers automatically.","severity":"gotcha","affected_versions":"all"},{"fix":"Port any necessary extra_script logic to fbuild's configuration or pre/post build hooks.","message":"If your PlatformIO project has custom `extra_scripts`, they might not run under fbuild. fbuild uses its own build process and may ignore PlatformIO's extra scripts.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `fbuild` instead of `fb` in scripts and documentation.","message":"The command-line tool `fbuild` was renamed from `fb` in version 2.0.0. The old `fb` command is no longer available.","severity":"deprecated","affected_versions":"2.0.0+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install fbuild` in the correct environment (e.g., virtual environment or base Python).","cause":"fbuild is not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'fbuild'"},{"fix":"Check that you are using the correct import: `from fbuild import FBuild`. In fbuild 2.x, FBuild is a top-level symbol. If using an older version, upgrade or adjust the import path.","cause":"You imported the package but are trying to access a symbol that was moved or removed in a newer version.","error":"AttributeError: module 'fbuild' has no attribute 'FBuild'"},{"fix":"Provide a valid board name, e.g., FBuildConfig(board='arduino_uno', ...).","cause":"You must specify a board when creating FBuildConfig; it's a mandatory field.","error":"fbuild.exceptions.FBuildConfigError: 'board' is required"},{"fix":"Use a supported platform. Run `fbuild list-platforms` in the terminal to see available platforms.","cause":"You supplied an invalid platform name.","error":"RuntimeError: Platform 'unknown' not supported. Check available platforms with fbuild list-platforms"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}