cc-libs/docs/adrs/adr-0001-target-computercraft.md

1.1 KiB

ADR 0001: Target ComputerCraft

Status

Accepted

Date

2026-06-07

Context

This repository exists to build APIs, servers, and programs for ComputerCraft / CC:Tweaked inside Minecraft.

The code is Lua, but the runtime is not generic local Lua. The real environment provides ComputerCraft APIs such as os.pullEvent, peripheral, modems, timers, labels, computer IDs, and the CraftOS filesystem.

Decision

This repo targets ComputerCraft / CC:Tweaked first.

Local Lua compatibility is not a goal by itself. Code can assume the ComputerCraft runtime and use ComputerCraft conventions when they make the in-game code clearer.

Consequences

  • Prefer ComputerCraft-style absolute require paths, such as require('/apis/net')() (most API modules return factories — call the result once to get the API).
  • Local checks are useful, but runtime behavior should be validated in-game or with CraftOS-PC when needed.
  • Avoid adding a local Lua harness unless there is a clear reason.
  • Keep the repository practical: this is for playing Minecraft, not designing a general Lua framework.