On Sat, Mar 27, 2021 at 07:15:56AM +0100, Tobias Klein wrote: > Also, the KaiOS developer portal does not mention how to deal with > native code. > https://developer.kaiostech.com/ > > So ... while the HTML/CSS/JavaScript part could probably be ported > easily, some form of native integration / bridge would be needed to make > SWORD work.
The point of kaiOS is that native code in user-installed apps isn’t just discouraged, it simply isn’t supported by the architecture at all. The idea is that modern JavaScript runtimes with good JITs are fast enough for even complex applications and, for more demanding things, WebAssembly enables you to run semi-precompiled code while reducing pressure on the garbage collector system, solving the remaining technical performance problems with JIT-based platforms. You’ll need to use something like emscripten (probably the best/least duplicative effort option) or a JavaScript port of SWORD to load modules. You will need to be able to remap the parts that try to access the filesystem for you to using web storage APIs or kaiOS-specific filesystem access APIs (which should be possible as long as libsword has an asynchronous virtual file system layer). When I played with a FirefoxOS phone a long time ago, I used something that looks like https://zefanja.github.io/biblez-ng/ . It claims to use https://github.com/zefanja/swordjs , “a pure Javascript library to read bible modules”. So it looks like this is the not-emscripten option. As long as the module format does not have too many new features since then, I assume swordjs could be updated. But if you want to use something like Bishop which, I assume, relies on other features of libsword (beyond simply loading text out of a module just enough to display it), that would be nontrivial (and duplicative of effort). So maybe the emscripten option should be investigated. But to get something minimal and working out there, the BibleZ project could probably almost be published as is… -- binki Don’t forget to check for missing or extraneous apostrophes!
signature.asc
Description: Digital signature
_______________________________________________ sword-devel mailing list: sword-devel@crosswire.org http://crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page