I've compiled microPython on my Linux box, and can run simple Python programs, often seeing a handy speedup to my runtimes. (I think this is freakin' amazing and awesome.) I can use the command-line switches on the interactive interpreter to emit bytecode vs. native code, and can observe the impact on performance. (Again: great!) What I cannot do, however, is capture the '.pyc' bytecode or the native code. I've used 'strace' to determine that the executable does not access/write to any files after reading my input, so it's all occuring in memory. A cursory check of the source reveals that the '-X compile-only' runtime option merely skips running the (in-memory) generated code, but does not do anything to preserve the compiled result (search 'compile-only' and 'compile_only' in 'unix/main.c' to see what I mean).
So, the question is this: how can I retain the compiled result (specifically, the native code) in an executable format? Must even that 'native' code be run through the interpreter (presumably because it lacks some boilerplate bits)?
Capturing Native/Compiled Code
Re: Capturing Native/Compiled Code
Just resolve this ticket: https://github.com/micropython/micropython/issues/222
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Capturing Native/Compiled Code
Oh – easy peasy.
Reading through that discussion, it's clear that I should stick to my dayjob. I fairly well follow the gist of it, but it looks like I'm of no help in this area. Thanks for your contribution to the project!
Reading through that discussion, it's clear that I should stick to my dayjob. I fairly well follow the gist of it, but it looks like I'm of no help in this area. Thanks for your contribution to the project!