QuickJS: creating a shared c module and import it as a module in js
- After a day exploration and a lot of frustration, finaly some clarity found thanks to https://github.com/khanhas/minnet-quickjs
preparing the .c/.h files
- the first few lines of your .c/.h files are very important !
#define countof(x) (sizeof(x) / sizeof((x)))=> this one should be copy & pasted, or inclued
- the JS_INIT_MOULE is also critical as quickjs relies on that ! typos are critical (spent an hour on a typo ...)