Author: Mike Hearn 2013-07-16 09:21:40
Published on: 2013-07-16T09:21:40+00:00
The conversation starts with a suggestion to use C++ for more flexibility on other platforms and Android compatibility through NDK. However, the other person points out that bitcoinj already runs SPV wallets on Android on top of Dalvik without requiring the NDK. The discussion then shifts to j2c, which is a tool for transpiling Java code into C++. The speaker suggests looking into the quality of j2c's output and provides an example link. They caution that j2c was written for fun and isn't documented well, but they are currently fixing bugs and improving it. The speaker highlights some things to be aware of when using j2c, including the explicit null pointer checks generated for full portability, the lack of proper bounds checking for array accesses, and the need to modify the generated code for convenience. They also note that the resulting code requires Boehm GC and may have unused generated code, which needs to be eliminated during linking to avoid huge binaries.
Updated on: 2023-06-06T20:00:28.229853+00:00