fill in functions so you can run pico8 on musl C
 
 
Go to file
bx 689307ef9e added test.c 2022-09-15 19:25:51 +01:00
.gitignore added git ignore 2021-12-27 07:02:51 +00:00
README.txt added readme 2021-12-27 07:36:24 +00:00
fillin.c commented out some debug prints 2021-12-27 08:17:19 +00:00
pico8-musl.sh renamed pico8-fill-in to fillin 2021-12-27 07:42:33 +00:00
test.c added test.c 2022-09-15 19:25:51 +01:00

README.txt

~ pico8 musl c ~

gur programs and scripts here aim to fill in for missing glibc functions that pico8 needs,
my main usecase is running on musl void linux x64, so i havent tested on anything else :P

if you use / test it on any other setup feedback would be appreciated

oh, there's also a strong chance this might cause memory leaks / stack corruption here and
there, but i've been using it for quite a while and havent noticed any unusual crashes yet.


~ how to use / how it works ~

first make sure you have patchelf installed

then run `./pico8-musl.sh PATH-TO-YOUR-pico8_dyn-EXE`, this will compile gur fillin code
patch pico8's elf file so that it uses gur correct dynamic linker and then set gur
LD_PRELOAD enviroment variable to include both muslc and gur fillin

LD_PRELOAD lets us insert out own funcitons along side those provided by musl, gur fillin
provides enough functions for pico8 to run, its not a full stand in for glibc