Giter Site home page Giter Site logo

Comments (5)

mateoconlechuga avatar mateoconlechuga commented on July 17, 2024

Reopened because brainstorming never hurts :D

from cemu.

adriweb avatar adriweb commented on July 17, 2024

Since I work on C++<->Lua integration on a daily basis at work, I feel like I would be inclined to think about some Lua(/LuaJIT) integration into CEmu.
After all, Lua is probably the most fitted language for scripting within that kind of host.
https://github.com/ThePhD/sol2 looks interesting to provide nice C++ wrappers/helpers.

Ideally, the main core functions would be exposed, including debugging-related ones, and of course all of the GUI should be accessible programmatically too.
Once all that is "done", using Lua for scripting would supersede the JSON autotester files, for instance, right now relying on an array of semi-hardcoded actions to do the work (which works, but isn't as nice as it could be with proper scripting APIs built-in)

I'm assigning myself to this task, but oh well, I have no idea when I'm going to work on that. CEmu might reach 3.0 by then :P

Any ideas/suggestions/brainstorming/comments welcome...

from cemu.

adriweb avatar adriweb commented on July 17, 2024

For fun, I added a few lines here and there on a with_lua branch to get something to build (just on my machine ; it's very WIP).
The example code from Sol does work:

sol::state lua;
int x = 0;
lua.set_function("beep", [&x]{ ++x; });
lua.script("beep()");
assert(x == 1);

I'll look into how to integrate LuaJIT, apparently it's not so hard to call an external makefile from within the .pro. Then, it would be a static lib to use.

Then of course, the big part will be what/where/how to bind Qt (+ core) methods properly.

from cemu.

adriweb avatar adriweb commented on July 17, 2024

As one can see in the with_lua branch, I've started binding just a few things to try it out, and it seems to work okay so far:
A little lua script

from cemu.

adriweb avatar adriweb commented on July 17, 2024

Let's just close that in favor of #252.
Reopen if needed...

from cemu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.