Yes, you can do that. Easiest way it to look at the code that gets sent to Espruino for a compiled function (E.nativeCall(....)) by looking back in the command history, and you can then just copy that, put it on an SD card, and use eval to evaluate it and return the result (the native function).
Only downside is that the native functions will be different for each firmware version of Espruino, so if you update the firmware you'll have to update each function.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, you can do that. Easiest way it to look at the code that gets sent to Espruino for a compiled function (
E.nativeCall(....)
) by looking back in the command history, and you can then just copy that, put it on an SD card, and useeval
to evaluate it and return the result (the native function).Only downside is that the native functions will be different for each firmware version of Espruino, so if you update the firmware you'll have to update each function.