mkxp-z/libretro
刘皓 eeef9ff943
Don't make sandbox_malloc into a coroutine
Okay, the coroutine implementation of `sandbox_malloc` is clearly
broken. It would be working if Asyncify instrumented the `memory.grow`
WebAssembly instruction, but it doesn't instrument it.

This commit reverts commit 42c4ff9497 and
also increases the default VM memory allocation from 64 MiB to 96 MiB to
account for the lack of ability to increase the memory allocation at run
time. I'll find some new way to implement increasing the memory
allocation later.
2025-03-18 13:49:41 -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 Fix typo in libretro/Makefile 2025-03-03 18:45:31 -05:00
README.md Remove dependency on xxd 2025-02-27 23:32:30 -05:00
ruby-bindings.h Don't make sandbox_malloc into a coroutine 2025-03-18 13:49:41 -04:00
sandbox-bindgen.rb Don't make sandbox_malloc into a coroutine 2025-03-18 13:49:41 -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, wasm2c from WABT and ctags from Universal Ctags or Exuberant Ctags accordingly:

make WASI_SDK=/path/to/wasi-sdk WASM_OPT=/path/to/binaryen/bin/wasm-opt WASM2C=/path/to/wabt/bin/wasm2c 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