Closed jiaaro closed 4 years ago
works for me
I will have another look and test it tomorrow. It's a national holiday, so I will have no excuse not to!
Would you believe it - I don't have any project to test this on, because my 11.3-projects use LuaJIT-features (either the bit module or FFI). I think you should allow building projects for 11.0, 11.1 and 11.2, because 11.3 should be backwards compatible and maybe only display a warning, if it doesn't match (or ask with a yes/no-prompt, but I'm not sure if I like that).
I'm not really sure if the steps you are following here are correct. I just had a couple minutes look at the love.js repos and I'm not sure where you got your steps from. Can you link to something? Or did you figure it out yourself? In that case we might want to fix the love.js-version so it stays functional?
The steps in the love.js repo are for people who want to run the tool using nodejs - however lovejs primarily provides a set of JS files which are the love 11.3 repo compiled into web assembly. I've reimplemented the templating lovejs does in javascript in python (see their index.js). Everything else is just copying their compiled files to the right places
I tried out some projects. Simple love projects that don't do anything fancy work fine (this worked: https://pfirsich.itch.io/spacetris and it's amazing), but love.js can't do LuaJIT specific stuff, which includes FFI, but also the bit
module. And obviously you can't add any Lua modules from shared libraries, which shockingly excludes almost every other project I have (damn)!
I wonder if we should include a note about this somewhere and maybe warn/error if the configuration includes shared libraries. I added a note to the readme, but maybe there needs to be more?
I attached the few missing changes as a patch to this comment, because I didn't want to PR in your repo (I think that would end up in a total mess). I don't know how to handle this properly. You don't have to commit it yourself (you can though!). I just want to make sure you agree with the changes: pull_9.txt (I have to attach as .txt, because GitHub won't let me upload a .diff or .patch :))
After a short private conversation it turned out jiaaro is pretty busy right now, so I will just merge and add the final adjustments.
Hey! This looks really exciting! I wonder if it makes more sense to call the target
lovejs
instead of web, in case some other system will be supported in the future either alongside love.js or replacing it, but having incompatible configuration.