HelloXM
HelloXM

Reputation: 11

How can I develop applications that call my self c/c++ library API in KaiOS

I know KaiOS application usually developed by html/js/css, but I develop some special functions that is not exist in the current Web API, so I develop the API of the special functions using C/C++, and now, I want to define JS API to call the C/C++ API, how should I do it? is there some document about it?

Upvotes: -1

Views: 204

Answers (2)

Arkaneel
Arkaneel

Reputation: 1

Now KaiOS 3.0 supports webassembly as the b2g is updated to Firefox 54 You can convert the file to webassembly using emscripten with highest optimisation to run C/Cpp/Java/python/Go/Rust in KaiOS.

Upvotes: 0

pelya
pelya

Reputation: 4494

You need to compile your C/C++ files to JS using Emscripten, then call your functions using this Emscripten API:

https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html

Upvotes: 1

Related Questions