There is 40k of flash available for code so if you had 40k or under of JS file then you would be able to upload that to flash. Of course it may need more RAM when it ran.
Please could you share your original (unbundled) source file? We might be able to suggest some things to let you fit it in since I'm sure your original 'engine' file would be small enough to fit.
While Espruino doesn't support Async it does support promises, and I'm pretty sure a decent transpiler would be able to convert your code without much overhead. I'd be amazed if it couldn't be modified very easily to run without the Buffer, tiny-stack and EventEmitter code that you have.
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.
There's http://www.espruino.com/Features
re 40k: It depends how you upload (to RAM or flash) - see http://www.espruino.com/Saving
There is 40k of flash available for code so if you had 40k or under of JS file then you would be able to upload that to flash. Of course it may need more RAM when it ran.
Please could you share your original (unbundled) source file? We might be able to suggest some things to let you fit it in since I'm sure your original 'engine' file would be small enough to fit.
While Espruino doesn't support Async it does support promises, and I'm pretty sure a decent transpiler would be able to convert your code without much overhead. I'd be amazed if it couldn't be modified very easily to run without the Buffer, tiny-stack and EventEmitter code that you have.