Computerraria: a RISC-V CPU built from Terraria wiring
A fully compliant RISC-V computer made inside the game Terraria
At a glance
- What is it?
- Computerraria emulates an rv32i instruction set inside Terraria's wiring system, with an optional accelerator mod for speed. Here is what the repository actually documents, and where the setup stops being straightforward.
- Who is it for?
- Adopt Computerraria if you want a working rv32i target that lives in a Terraria world and you are on Linux with tModLoader, a Rust toolchain and the WireHead mod source cloned into ModSources.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 114 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- misprit7/computerraria3,859 ★ · -3
| Repository | 2026-09-24 | 2026-11-24 |
|---|---|---|
| misprit7/computerraria | 3.9k | 3.9k |
-3 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Computerraria is and who it is for
Computerraria is a computer built inside Terraria's wiring system. It implements the rv32i instruction set, the 32-bit base integer ISA, using the game's logic gates rather than silicon. The README describes it as "a fully compliant RISC-V computer inside Terraria" and links a video explanation for the design. The stated goal, in the project's own words, is to "maximize the compliance and processing ability of the in game cpu", which is a different ambition from the joke in the Pitch section about pushing computing speeds back to the early 70s. The pitch is the hook; the compliance work is the actual project.
The audience is narrow and specific. You need Terraria through tModLoader, a Rust toolchain, and tolerance for a setup that involves copying world files between directories and building a mod from source. The repository ships higher-level applications under app/, written in Rust, with app/pong as the worked example and app/template as a starting point for new programs. If you write Rust and want a target where the instruction set is real but the machine is made of game tiles, this is the project. If you want a general-purpose RISC-V emulator, it is not.
How the rv32i core runs on Terraria wiring
The mechanism is emulation at the logic level. Terraria's wiring system provides gates and signal propagation, and Computerraria arranges those into a processor that decodes and executes rv32i instructions. The README does not publish a gate-level schematic in the text, but it points to a navigable poster image for the layout and to doc/ for notes. The world file itself, computer.wld, is described as acting "much more like source code" than a save file: it is edited manually, compresses well, and is copied back and forth to the user installation with copy-world.sh rather than edited in place.
Raw vanilla wiring is the bottleneck, so the project depends on an accelerator. WireHead is described as "a wiring accelerator and headless control mod" that "maintains full compatibility with the vanilla wiring system but reimplements it in a much more efficient manner". With WireHead installed, the README lists the current specs: clock speed around 5kHz, 96kb of RAM, instruction set rv32i. Those figures are the project's own claims for the accelerated configuration, not a benchmark I ran. The dependency is structural: the compliance and speed goals are only reachable with the mod, which means the computer is not a pure vanilla artifact even though the wiring semantics are vanilla-compatible.
Programs reach the machine through a driver layer. app/tdriver is described as a driver API for interacting with the CPU from Rust, covering "extremely low level startup code and graphics drivers", and app/template implements a minimal version of it. That is the data flow: a Rust binary built on tdriver is written into the world through the in-game /bin command, and the CPU executes it against the wiring.
Installing Computerraria and running Pong
The setup is a sequence of file operations and one in-game command. Start by cloning the repository where you want to keep it, then copy computer.wld into your tModLoader worlds directory. The README gives the platform paths explicitly, and on Linux the copy-world.sh script automates the round trip with --to and --from flags.
# Linux world path
~/.local/share/Terraria/tModLoader/Worlds
# copy the world back and forth
./copy-world.sh --to
./copy-world.sh --fromNext, clone WireHead into the mod sources folder. The README shows the Linux form:
cd "~/.local/share/Terraria/tModLoader/ModSources" && git clone https://github.com/misprit7/WireHead.gitBuild the program you want to run. For Pong, the README compiles the Rust app and copies the binary somewhere convenient:
cd <path to computerraria>/app/pong
cargo rb
./copy-bin.sh /tmp/pong.txtNow start tModLoader, go to Workshop then Develop, and click Build next to WireHead. Open the world you copied. In game, write the binary into the computer:
/bin write /tmp/pong.txtThere is a known bug at this point. The README states the NPCs that run the CPU clock are too far away to spawn immediately. The documented workaround is to go through the blue teleporter in the control panel image, fly upwards a bit, come back down, and go back through the same teleporter. After that, press the first two of the three levers on the far right to start the program, then take the orange teleporter to the screen area. Pong should be running, controllable with the controller beneath the screen; the README suggests HERO's Mod camera lock to see screen and controls together.
For headless or CI use there is a Docker image, pulled and started with two commands:
docker pull misprit7/computerraria
docker run -it misprit7/computerrariaThe README says this image already has all tooling installed, so you should be able to build everything inside it.
Linux only, clock NPCs, and the accelerator dependency
The most concrete limitation is platform support. The README states that "currently only Linux is fully supported, and only parts of this have been tested on Windows", with the suggestion that WSL should make Windows work in theory. That is an admission, not a compatibility matrix. If you are on macOS, the README says nothing about your case at all.
The clock NPC bug is a real failure mode for first runs. A computer whose clock depends on NPCs spawning in a specific location is sensitive to world state in a way a normal emulator is not. The workaround works, and the README expects it to be temporary, but it means the first-run experience includes a manual in-game maneuver that has nothing to do with the CPU.
WireHead is the third constraint. Without it, the vanilla wiring system is what you get, and the ~5kHz figure does not apply. The README frames WireHead as the reason the compliance and speed goals are reachable, so treating Computerraria as a self-contained vanilla build misreads the architecture. If you cannot build or run a tModLoader mod from source, the project is out of reach regardless of your Rust skill.
How Computerraria differs from a standard RISC-V emulator
The obvious alternative for running rv32i code is a software emulator such as QEMU or spike, the RISC-V reference simulator. The difference is not speed, since a software emulator will beat a ~5kHz clock by orders of magnitude. The difference is what the machine is made of. A software emulator models the ISA in host code; Computerraria models it in Terraria's wiring graph, and the world file is the artifact you edit and copy around. That makes it useful for inspecting a CPU as a physical layout, for the compliance testing exercise itself, and for the novelty of running Pong on tiles.
A second comparison point sits inside the repository. The test/ directory uses riscof, the RISC-V compliance framework, with a Computerraria plugin alongside a reference plugin (sail_cSim). That pairing is the project's own answer to correctness: the same compliance tests are run against the in-game CPU and against a reference model, which is a more meaningful comparison than any speed claim. Note that the README excerpt stops mid-sentence in the file listing for test/, so the full test configuration is not documented here.
Licence, maintenance and upgrade cost
The repository is MIT licensed, which permits reuse, modification and redistribution provided the copyright notice and permission notice are preserved. That is a permissive licence and it matters here because computer.wld is treated as source and copied into your own game installation; MIT does not restrict that. This is a description of the licence text, not legal advice.
The repository is not archived, and the last push was on 2026-08-03. The repository has no published GitHub releases, so there is no versioned artifact to pin; you track the main branch. Two CI workflows are referenced in the README badges, one for in-game tests and one for Rust tests, which suggests the compliance suite runs on changes. Upgrade cost is therefore branch-shaped: pulling changes means re-copying computer.wld with copy-world.sh and rebuilding WireHead, since the two are separate repositories that must stay in step. The Docker image is tagged on Docker Hub rather than by release, so headless users pull the current image rather than a fixed version.
Editorial conclusion
Adopt Computerraria if you want a working rv32i target that lives in a Terraria world and you are on Linux with tModLoader, a Rust toolchain and the WireHead mod source cloned into ModSources. Do not adopt it if you need a stable cross-platform emulator, a documented CLI, or something you can run without the game: the README states only Linux is fully supported and parts have been tested on Windows, and the clock NPC bug means a manual teleporter workaround is part of the first run. Verify before committing: that the in-game test workflow badge on the default branch is green, that WireHead builds against your tModLoader version, and that /bin write accepts your binary path once the workaround is done.
Frequently asked questions
Is Terraria Turing complete?
Computerraria does not answer that question directly, but it demonstrates that Terraria's wiring system is expressive enough to host an rv32i CPU, which is a strong practical signal. The project implements the rv32i instruction set inside the game's wiring, with WireHead accelerating the simulation.
How do I install Computerraria?
Clone the repository, copy computer.wld into your tModLoader worlds folder, and clone WireHead into the ModSources folder. Build WireHead from the Workshop then Develop menu in tModLoader, open the world, and write a compiled binary with /bin write. Only Linux is fully supported according to the README.
Does Computerraria work on Android or Windows?
The README states that only Linux is fully supported and that only parts have been tested on Windows, with WSL suggested as the likely path. It does not mention Android at all.
What is WireHead and do I need it for Computerraria?
WireHead is a wiring accelerator and headless control mod by the same author that reimplements the vanilla wiring system more efficiently while keeping compatibility. The README lists the ~5kHz clock speed and 96kb of RAM for the configuration with WireHead installed, so it is effectively required for the stated specs.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/misprit7-computerraria)Star history chart for your README
[](https://hysenlabs.com/projects/misprit7-computerraria)Was this useful?