First of all, thanks for implementing the Espruino engine and the possibilities it may provide for the community.
I'm considering using the Espruino engine to be embedded into a Ansi-C console application (Open Source project), running on generic Linux.
I haven't really found any documentation about how this can be done, just trying to get my head around it all by looking sporadically into the sources. So my questions are:
It's probably best if I answer in order:
Yes - just look at targets/linux/main.c to see how this works.
It's probably best to just define your functions with the specially formatted comments in the header, and they'll be added at compile time. See jswrap_*.c to see how it works.
Having said all that, it might be worth looking at something like duktape instead. Espruino is designed for chips with 8-128kB RAM. As such it's really efficient for them, but if you start to use it for bigger things then it will probably start to show some weaknesses (like in the handling of big arrays).
Duktape seems to be an excellent choice, since I only would want to expose certain API's.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem