March 28, 2026

Conveyor belts, meet silicon dreams

A Verilog to Factorio Compiler and Simulator (Working RISC-V CPU)

Players Are Coding Real Computers in Factorio — Send Help

TLDR: A new tool, v2f, turns code into Factorio blueprints and even runs a real RISC‑V computer design inside the game. Commenters split between awe at the engineering magic and fear that installing it will nuke their free time—equal parts applause and self‑preservation vibes.

The internet did a double‑take: a new tool called v2f lets players write hardware logic in code and spit out Factorio blueprints, even showcasing a working RISC‑V CPU (translation: a real computer brain) running inside the factory game. There’s a simple web GUI, a Lua route for tinkerers, and a command‑line path for power users, all aiming to turn code into conveyor‑belt magic. You can simulate your circuit, export a blueprint, and watch your base literally compute. Demo and docs live on the project repo.

But the comments turned this into a sitcom. One camp is pure awe: “Truly excellent,” cheered a fan, while others called it “mind‑melting” and begged for more examples. The other camp? “I’ve heard a lot about Factorio… I stayed away so far,” confessed another, basically saying this mod is the final boss of productivity traps. The joke of the day: download this and your weekend evaporates faster than an iron ore patch.

The playful drama is all about restraint vs. obsession. Some want deeper Yosys integration (the heavy‑duty tool behind the scenes), others just want a big shiny button that says “build CPU.” Either way, v2f is the new siren song: make a computer… in a game… with code… then lose track of time watching belts blink.

Key Points

  • v2f converts Verilog designs into Factorio 2.0 JSON blueprint strings and provides Rust and Lua APIs for programmatic design and simulation.
  • The project offers a backend GUI to place and simulate combinators; running Yosys in-browser is not supported.
  • Setup options include a GitHub-hosted dev container, Docker with VSCode Dev Containers, and a bare-metal path with listed dependencies.
  • A CLI is provided (after cargo build --release) to run Lua scripts and generate blueprints, with environment helpers via env.bash.
  • Yosys is used for RTL/word-level mapping; users can run Yosys scripts and re-invoke v2f on rtl_map.json. An example RV32IM RISC-V CPU (from Ultraembedded) is included and runs in-game.

Hottest takes

“What a wild idea, but it makes sense!” — skyberrys
“Truly excellent.” — jw1294
“I… stayed away so far.” — skyberrys
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.