[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Using Lua for core application logic, gluing to C++ GUI
- From: Ivan Krylov <krylov.r00t@...>
- Date: Tue, 28 Aug 2018 18:20:51 +0300
Hi!
I'm planning to write a networked application. I'm not a professional
programmer and I don't have a lot of free time, so I'm trying to
save as much time as possible by preventing duplication and choosing
the best fitting technology for the task at hand. Unfortunately, I
would like the application to have GUI and run on a wide range of
targets (major PC OSes + Android), so some C++ programming is
inevitable (since C++ is the "lowest common denominator", code
depending on reasonably portable libraries can be expected to compile
without changes), especially the UI part (where I would have to
implement two different user interfaces).
I'm considering Lua for the cross-platform part of the code. On the one
hand, it might lower the attack surface (much harder to have an
arbitrary code execution vulnerability without eval or raw pointers);
also, I'm being told that Lua coroutines are great for expressing
algorithms that do lots of network I/O. On the other hand, I would have
to write my own wrappers for all outside dependencies I may want to
bring into the project (more potential vulnerabilities here?); and if I
wanted to publish my algorithm as a library usable from other languages,
I would also have to wrap Lua back into a set of C routines (for C is
the lingua franca of programming languages).
Speaking of outside dependencies, I absolutely need TLS sockets and
hashing and may try to use DTLS, sound I/O and codecs in the future.
Is it a good idea to write the core/library part of a networked
application in Lua, then wrap it in C++ launcher/interface (built using
Qt or JUCE for most cross-platform compatibility)?
--
Best regards,
Ivan