I'm not into writing tutorials right now, but I can answer any concrete 
questions. Jnim at this point allows "implementing" java classes in nim (still 
experimental feature though). So as long as you know how to write your app in 
java, it's just a matter of 1-to-1 porting.

One important point to consider is how pure-nim you wanna go with the 
toolchain. Surely we want to build apks without java, android sdk, gradle, etc. 
But then comes reality and you want to add e.g. firebase push notifications to 
your project, and it's straightforward for gradle, but for a hypothetical 
custom toolchain... realistically impossible, imo.

Then comes the runtime question, in particular: on which android thread is your 
nim "main" thread. Your mentioned use-case suggests nim main thread is equal to 
activity UI thread, but any high-fps opengl/vk app would likely prefer a 
secondary thread, as it is less runloop overhead, larger stack size, and 
allowed to "hang" without activity being killed (that might be a useful or 
harmful feature, depending on the usecase). And if pretty much all of your 
logic lives in secondary thread, it would be handy/logical to run nim "main" 
thread on it as well, like it is done with e.g. SDL2, ndk_native_glue (and thus 
glfm). And controlling this threading aspect from nim still remains unsolved 
afaik, partly because of nim threading nuances.

Reply via email to