Skip to content

More lua integration work (proof-of-concept) - #20851

Draft
hrydgard wants to merge 10 commits into
masterfrom
lua-work
Draft

More lua integration work (proof-of-concept)#20851
hrydgard wants to merge 10 commits into
masterfrom
lua-work

Conversation

@hrydgard

@hrydgard hrydgard commented Oct 3, 2025

Copy link
Copy Markdown
Owner

This simply makes the plugin system support lua, and adds a whole bunch of functionality to our lua contexts. Note: Hook functionality is still missing so all you can really do with this is binary patches on startup currently, and print to the log.

Unfortunately I've ran into the issue now that you can't safely save/load a complete lua state, it's just not possible to do the way they're designed. But we can probably approximate it well enough by reloading scripts on save state load, and saving/restoring any global variables on top. It will be pretty complicated now and the plugins will need to be aware of some restrictions.

@hrydgard hrydgard added the Scripting Scripting (lua) label Oct 3, 2025
@hrydgard

hrydgard commented Oct 4, 2025

Copy link
Copy Markdown
Owner Author

Hm, looks like we'll have to build armips (the assembler) for libretro as well, if we want to support lua there....

@hrydgard
hrydgard force-pushed the lua-work branch 2 times, most recently from 06610f9 to b836594 Compare October 6, 2025 23:03
@hrydgard

hrydgard commented Oct 6, 2025

Copy link
Copy Markdown
Owner Author

ugh, an ElfTypes.h include path conflict (we have two of them, one in armips and one for ppsspp).

@hrydgard
hrydgard force-pushed the lua-work branch 2 times, most recently from cb067bf to 6737635 Compare October 7, 2025 22:16
@hrydgard
hrydgard force-pushed the lua-work branch 2 times, most recently from 96e2c39 to 6656739 Compare October 8, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scripting Scripting (lua)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant