Commit graph

13 commits

Author SHA1 Message Date
刘皓
fe5a94aea7
Implement loading scripts from Scripts.rxdata for libretro 2025-01-18 18:51:29 -05:00
刘皓
f10dc81410
Add more sandbox bindings 2025-01-18 13:51:58 -05:00
刘皓
94e8d4607d
Fix sandbox bindings for Ruby globals
It has come to light that the global bindings generated by wasm2c are
not the globals themselves, but rather pointers to the memory locations
where the globals are stored. I've updated sandbox-bindgen.rb to take
this into account.
2025-01-18 01:43:52 -05:00
刘皓
9edac122fb
Add sandbox bindings for Ruby constants and use zstd compression for libretro Ruby dist 2025-01-17 22:04:42 -05:00
刘皓
510f1b0211
Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00
刘皓
e31dd0f32e
Improve compilation flags for libretro builds 2025-01-10 17:57:10 -05:00
刘皓
4c0ab3639b
Implement handling of fibers and exception catching in libretro sandbox runtime 2025-01-10 00:47:52 -05:00
刘皓
2a204178fe
Implement stackful coroutine-based executor for libretro builds
This executor has the advantage of being able to work correctly when
there are Ruby stack frames underneath C/C++ stack frames in the stack.

Still need to implement handling Ruby fibers.
2025-01-08 19:39:48 -05:00
刘皓
c4d5d8af97
Turn all sandbox bindings into coroutines
We can't have them as normal functions because reentrant calls into the
Ruby API don't work if you do that, i.e. calling into the Ruby API and
that calls mkxp-z's bindings and that calls back into the Ruby API.
2025-01-07 00:02:09 -05:00
刘皓
1439b3181d
Use C compiler to preprocess Ruby headers before passing to Ctags
Ctags by itself misses a few functions defined in the Ruby API.
2025-01-05 16:42:48 -05:00
刘皓
19cafa332c
Fix array indexing in sandbox-bindgen.rb 2025-01-05 13:08:33 -05:00
刘皓
7de761873c
Fix _sbindgen_create_func_ptr() implementation 2025-01-04 22:27:02 -05:00
刘皓
3e79e8b390
Add binding generator for Ruby in libretro builds 2025-01-04 18:13:44 -05:00