mkxp-z/libretro
2025-05-12 12:39:08 -04:00
..
.gitignore Change some of the nomenclature in libretro builds 2025-02-14 12:05:30 -05:00
core.info Change some of the nomenclature in libretro builds 2025-02-14 12:05:30 -05:00
link.T Change some of the nomenclature in libretro builds 2025-02-14 12:05:30 -05:00
Makefile Handle current working directory properly in libretro builds 2025-05-06 16:55:28 -04:00
README.md Pin wasm2c version in libretro builds 2025-05-01 00:53:26 -04:00
ruby-bindings.h Use C getcwd() instead of Ruby Dir.pwd() to get CWD in libretro builds 2025-05-06 18:02:03 -04:00
ruby-compat.patch Apply patches from https://github.com/mkxp-z/ruby in libretro builds 2025-04-10 14:00:32 -04:00
ruby-jump-buffer.patch Fix memory leak in cont_restore_thread in Ruby in libretro builds 2025-04-21 11:16:21 -04:00
ruby-stack-pointer.patch Rework the patches for Ruby WASI memory leaks 2025-04-20 11:56:50 -04:00
sandbox-bindgen.rb Apply big-endian fixes to binding-sandbox/wasi.cpp as well 2025-05-12 12:39:08 -04:00

The build process for the libretro core is divided into two stages.

Stage 1

All the files produced by this stage are platform-agnostic, so you can run this build stage on any computer, regardless of which operating system or CPU architecture the libretro core is for.

Required software:

Go to the directory that this README.md is in and run this command, filling in the paths to WASI SDK, wasm-opt from Binaryen and ctags from Universal Ctags or Exuberant Ctags accordingly:

make WASI_SDK=/path/to/wasi-sdk WASM_OPT=/path/to/binaryen/bin/wasm-opt CTAGS=/path/to/ctags

This will produce the directory "libretro/build/libretro-stage1".

Stage 2

This stage produces the actual core file.

Required software:

No software libraries are required other than the system libraries.

Go to the root directory of this repository and run:

meson setup build -Dlibretro=true
cd build
ninja