Hi all,
I know Numba
already have standalone compilation https://numba.pydata.org/numba-doc/dev/user/pycc.html …
But for me it would be better if it would allow to compile any python program that was properly annotated:
def calculation(num: numba.i32):
... logic ...
def listen_on(client: Client):
... logic ...
if __name__ == '__main__':
... do some stuff
If all objects properly annotation with in basic types that Numba
provides then code will be compiled to x86
, x64
, wasm
…
As for me the better approach is to implement it first for wasm
because there are already available run-times that could run this code wasmtime and even compile this wasm
code to native targets AOT
It means by implementing only one generator for wasm
it will allow to use compiled Python
code on any platforms
Similar approach already done by AssemblyScript