minivm VS android-luajit-launcher

Compare minivm vs android-luajit-launcher and see what are their differences.

minivm

A VM That is Dynamic and Fast (by FastVM)

android-luajit-launcher

Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI (by koreader)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
minivm android-luajit-launcher
13 4
1,554 120
0.4% 1.7%
8.9 7.5
5 days ago 12 days ago
C Kotlin
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

minivm

Posts with mentions or reviews of minivm. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-09.

android-luajit-launcher

Posts with mentions or reviews of android-luajit-launcher. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-08.
  • KOReader Android 2.3.4
    1 project | /r/koreader | 9 Feb 2023
    Android 2.3 support was dropped back in 2019, see https://github.com/koreader/android-luajit-launcher/pull/91. The current minimum supported version is 4.0.
  • KOREADER is blurry -
    1 project | /r/Onyx_Boox | 30 Nov 2022
    Here: https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt
  • How do I implement positioning recognition in Lua?
    1 project | /r/lua | 18 Mar 2022
    That said, I've even developed a Lua/Android bridge myself back in time (other people have much improved that since) - https://github.com/koreader/android-luajit-launcher However, that was not driven by the idea to make "things simpler" somehow. I'm not providing that reference as a suggestion you use it for your task. It was done to provide means to run an existing Lua based codebase on Android devices. If I was to develop an application for Android devices from scratch, I think I would go with the Android SDK and Android Studio, probably using Kotlin.
  • MiniVM: A minimal cross-language runtime that beats C/luajit on some benchmarks
    10 projects | news.ycombinator.com | 8 Jan 2022
    Out of curiosity, are you planning on (progressively, slowly) rolling your own JIT, or using something like DynASM (https://luajit.org/dynasm_features.html), libFirm (https://pp.ipd.kit.edu/firm/Features.html), or some other preexisting thing (eg https://github.com/wdv4758h/awesome-jit) in the space?

    FWIW, I understand that LuaJIT gets some of its insane real-world performance from a JIT and VM design that's effectively shrink-wrapped around Lua semantics/intrinsics - it's not general-purpose. I've read (unfortunately don't remember exactly where) that people have tried to run off with the JIT and VM and use it in other projects, but never succeeded because of the tight coupling.

    In the same way, while a bespoke 64/32-bit x86+ARM JIT would be a reasonable undertaking, it could make for a pretty interesting target with a potentially wide-ranging set of uses.

    For example, it could be the VM+JIT combination that all those people dissecting LuaJIT were looking for :).

    I could see something like this becoming an attractive option for games that want an exceptionally simple runtime. Sort of like a scaled-down NekoVM (nee Haxe).

    Broadly speaking, I get the (potentially incorrect) impression (from a very naive/inexperienced POV) that MiniVM+JIT would be looking to close a more widely-scoped, higher-level loop than something like libFirm would be. So it'd be closer to Cling (https://root.cern/cling/) than raw LLVM, perhaps (albeit with 0.01% of the code size :D). It is for this reason that I kind of pause for a minute and ponder that a fully integrated JIT could be a pretty good idea. It would absolutely make the irreducible complexity of the project balloon, with reasonable motivation likely necessary to maintain cohesion.

    If I were to backseat-drive for a minute :) the first thing I'd rant about is how attractive modern JITs need trivial ways to verify code correctness, both online (how exactly was *this* specific generated code constructed - so, straightforward logging) but also (and particularly) offline (humans staring at the JIT source code and mentally stepping through its behavior - and succeeding (miracles!!) because the code is small and well-written). If the JIT implemented in such a straightforward manner, end users wanting to run potentially malicious user-supplied code with high performance in potentially security-sensitive settings might be attracted to the project. (Mike Pall made bank for a while while CloudFlare was using LuaJIT for its WAF... ahem...)

    I came across this reference of how to break out of LuaJIT 2.1 (2015) a while back: https://www.corsix.org/content/malicious-luajit-bytecode - and every time I take a look at the code I switch away from the tab :) (and sometimes step away from the computer for a minute :D). It's solely a demonstration of "this is how it would work", and clarifies that LuaJIT makes no sandbox guarantees about the code it executes, but reading through it, the amount of Stuff™ going on represents a surface area that to me (naively) seems just... like LuaJIT as a whole is generally too large to easily reason about from a security standpoint (oh yeah, besides being written in assembly language...). This might be inexperience speaking, but I can't help but wonder whether a smaller, simpler implementation might be able to implement a secure JIT; for all I know this might be an impossible P=NP pipe dream I haven't fully grasped yet, I guess what I'm trying to figure out is whether "small enough to mentally reason through" and "large enough to do a few things quickly" have practical overlap?

    ---

    On an unrelated note, something I discovered recently and which I thought I'd idly mention is that JITs might seem to have a bit of a hard time on Android. I can't (yet) tell if this is LuaJIT-specific or "anything that's a JIT"-specific: KOReader (Android eBook reader, implemented entirely using LuaJIT) has a bunch of very scary magic Things™ it seems to need to do to make LuaJIT even work at all on Android (https://github.com/koreader/android-luajit-launcher/blob/mas...), due to a apparently-current issue causing issues across different domains (https://github.com/LuaJIT/LuaJIT/issues/285), which has been apparently cropping up going back years (https://www.freelists.org/post/luajit/Android-performance-dr... (2013)). KOReader has even nontrivially patched LuaJIT's C code in places (https://github.com/koreader/android-luajit-launcher/blob/bb0...) with purposes I am yet to fully understand (it might just be for debugging). I happened to be considering idly playing around with Lua on Android (currently fascinated with interpreted/JITed runtimes) and after stumbling on this I'm debating whether to use Lua instead, ha. I've been meaning to ask around on the LuaJIT list and wherever KOReader discusses stuff to learn more, after focusing on actually getting LuaJIT linked into an Android project and poking around. Haven't got to it yet. This could be an absolutely massive red herring that I'm going deer-in-headlights about because it just looks off-in-the-weeds, or potentially significant. It might also be absolutely irrelevant, but as I noted I'm not (yet) sure how to tell.

What are some alternatives?

When comparing minivm and android-luajit-launcher you can also consider the following projects:

privacytests.org - Source code for privacytests.org. Includes browser testing code and site rendering.

wasm3 - 🚀 A fast WebAssembly interpreter and the most universal WASM runtime

sljit - Platform independent low-level JIT compiler

LuaJIT - Mirror of the LuaJIT git repository

sol2 - Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

paka - Paka language

asmjit - Low-latency machine code generation

awesome-jit - A curated list of awesome JIT frameworks, libraries, software and resources

kotlin-satlib - 🗿 SAT solver wrappers for Kotlin