Earlier quoted context omitted.
No. …and this one is no exception -> https://github.com/RustPython/RustPython/issues/1940 Packages that rely on c dependencies like numpy, etc. only work if you write a custom implementation by hand; the “normal” package flat out doesn’t (and cannot) work. So basically you get no packages that use native extensions, unless the project explicitly implements support for them. Pypy is the only implementation I’m aware o…
Would there be a way to write a bridge between the Rust interpreters and C API where calls to existing extension API could work to/from the Rust interpreter?
RustPython
151–160 of 244 posts
Re: RustPython
#152> "it can be compiled to WebAssembly in order to run Python in the browser." I have seen this approach with C-python and NodeJS already and I think it simply not viable, what they are suggesting is compiling the runtime (the same one you use in non-wasm projects) to wasm and then run your python code on top of it. This is a double-whammy of performance degradation, you basically have two JIT-compilation steps happeni…
> and NodeJS
Wait... what? Why?
Re: RustPython
#153Python 2 is dead and that's why Jython and IronPython, who have failed to catch up with Python 3, are dead as well and are not worth mentioning, are they?
Re: RustPython
#154It's been working quite well, though lack of C extensions is a problem. We're hoping to move to CPython once the wasi and C extension support is there.
But the project works, compiles to wasm32-wasi, and can execute on the live ICP network: https://github.com/demergent-labs/kybra
Re: RustPython
#155Re: RustPython
#156Happy to see RustPython making awesome progress! Note: I just realized that they mention wapm in their homepage. We phased out the WAPM CLI in favor of Wasmer ( https://wasmer.io ), so you can simply run in your shell: wasmer run rustpython Or, if you want to try it using the Wasmer JS SDK: import { Wasmer } from "@wasmer/sdk"; let rustpython = Wasmer.fromRegistry("rustpython"); let instance = await rustpython.entryp…
Re: RustPython
#157Earlier quoted context omitted.
I don't think you grasp quite the implications of what I was saying, this kind of approach could take _seconds_ to even start running your python application. Large python codebases could take like a minute to start if loaded that way. Once it does start then your arguments can make sense, but even so it would still make it impractical for most things. Trust me, when the Javascript dev tells you something will be slo…
Pyodide (standard cPython in WebAssembly) loads surprisingly quickly. My https://lite.datasette.io application usually starts up in less than 10s - most of that is downloading about 10MB of WASM blobs, and 10MB isn't actually that big these days (many sites serve more than that in image headers). When I built Datasette Lite I did it as a research project, assuming it would be far too slow loading to be useful. I've s…
10 seconds is absurdly slow, though. That's like time to install Mathematica from a disk image level slow.
Re: RustPython
#158Happy to see RustPython making awesome progress! Note: I just realized that they mention wapm in their homepage. We phased out the WAPM CLI in favor of Wasmer ( https://wasmer.io ), so you can simply run in your shell: wasmer run rustpython Or, if you want to try it using the Wasmer JS SDK: import { Wasmer } from "@wasmer/sdk"; let rustpython = Wasmer.fromRegistry("rustpython"); let instance = await rustpython.entryp…
Re: RustPython
#159Earlier quoted context omitted.
Sometimes, Things just can't be Done with Python. E.g., you're parsing dozens terabytes of data, or need response time within a microsecond. So, you're left with a choice of C++, Rust (what else, C#, possibly Zig and a few other). Rust stops being a "puzzle" once you've written enough of it and you just know how to do things. It has one major disadvantage though - returning back to write in languages like C++/Python…
I really, really get interested in rust sometimes and then I read comments like yours and remember the warnings about premature optimization and put it off again.
Re: RustPython
#160We've been using RustPython as the Python interpreter for our project Kybra, which is a Python environment for the Internet Computer Protocol (decentralized cloud, where all programs are automatically replicated across 13-40 nodes). Wasm is the runtime environment on ICP. It's been working quite well, though lack of C extensions is a problem. We're hoping to move to CPython once the wasi and C extension support is th…