2023-07-16 01:58:32 -04:00
# LCPU
LCPU is an alternative CPU core addon for GMod/Wiremod.
It provides:
- A standard RISC-V architechure (rv32ima) CPU core
- Extensive interoperation with the Wiremod addon
- A text editor and assembler suite based on LLVM (for writing bare-metal LCPU programs in assembly)
2023-07-16 06:20:11 -04:00
# Building Native Module
2023-07-16 01:58:32 -04:00
TODO: Steps to build the LCPU native module on Windows and Linux
2023-07-16 06:20:11 -04:00
2023-07-17 02:09:59 -04:00
LLVM is built using a podman container (see Containerfile). The steps for building follow (this should only need to be done once):
2023-07-17 00:10:31 -04:00
```
mkdir llvm_build
podman build -t llvm-build -f Containerfile.llvm
2023-07-17 02:09:59 -04:00
podman run --rm --mount type=bind,source=$PWD/llvm_build,destination=/build/llvm-build localhost/llvm-build
cp -rv llvm_build/install lua/bin/llvm
2023-07-17 00:10:31 -04:00
```
2023-07-16 06:20:11 -04:00
# Installation
2023-07-17 00:10:31 -04:00
This repository is set up in the exact directory structure to be a Legacy Addon; therefore once you have built the native module (TODO), adding it to a server should work fine.