How Rust Can Replace C In Python Libraries (infoworld.com)
An anonymous reader quotes InfoWorld:
Proponents of Rust, the language engineered by Mozilla to give developers both speed and memory safety, are stumping for the language as a long-term replacement for C and C++. But replacing software written in these languages can be a difficult, long-term project. One place where Rust could supplant C in the short term is in the traditionally C libraries used in other languages... [A] new spate of projects are making it easier to develop Rust libraries with convenient bindings to Python -- and to deploy Python packages that have Rust binaries.
The article specifically highlights these four new projects:
The article specifically highlights these four new projects:
- Rust-CPython - a set of bindings in Rust for the CPython runtime
- PyO3 - a basic way to write Rust software with bindings to Python in both directions.
- Snaek - lets developers create Rust libraries that are loaded dynamically into Python as needed, but don't rely on being linked statically against Python's runtime.
- Cookiecutter PyPackage Rust Cross-Platform Publish - simplifies the process of bundling Rust binaries with a Python library.
Why use the new language of the month when C has been around for decades, is welll understood and does exactly what we want?
How long before I start replacing rust with decay? 6 months? A year?
I've read a third of the Rust nightly book and watched many, many Rust videos on youtube. I like Rust very much. However, I believe Rust was invented by, is sponsored by, and gets it's major funding from the Mozilla foundation. There is essentially no more Mozilla Thunderbird, and the Mozilla Firefox browser is getting significantly less usage. We've had articles on such here on Slashdot. If the Mozilla browser itself falters any more, would Mozilla, and hence rust, stay alive?
Rust is very tied to Mozilla. And Mozilla's only remaining "successful" product is Firefox. But Firefox's market share is dropping. It was only a few percent, last I saw, while Chrome is over 50%. Mozilla reportedly gets a lot of funding from Yahoo, due to a Firefox search deal. So here we have an organization with one major product, but this project is being rejected by consumers, and what might be this organization's most significant source of revenue comes from this failing product and is paid for by another company that isn't doing so well. I fear for Mozilla's future if, say, the Yahoo deal wasn't renewed and they couldn't find a replacement.
If Mozilla goes the way of the dodo bird, then I can't see the Rust project really going anywhere. I don't think it has a robust independent community like C++ has, for example.
I think it is too risky to adopt Rust, especially for important long term projects. The tech industry moves fast. Rust could plausibly be gone in 3 years, while languages like C, C++ and even PHP are far more likely to be going strong.
I was interested in learning Rust and perhaps using it for some personal projects, but then I discovered how the community seems to care so much about social engineering.
We're not allowed to use "Master" and "Slave". https://github.com/rust-lang/rust-buildbot/issues/2
We're required to rephrase old texts to fit into "gender non-binary" language. https://github.com/rust-lang/rust/pull/25640
I'm sure they don't have problems "killing child processes" though...
etc., etc.
I'm not interested in using a programming language as some kind of social engineering experiment.
.. when Linus decides the next major release is to be written in Rust.
... :)
Or for argument's sake, Mozilla itself.
Every language has it pitfalls, at least with ye olde C/C++ I know where to look and what to expect.
Suddenly you start to respect and embrace the get-off-my-lawn attitude, you simply want things to work rather than be written in the next greatest language of the moment.
I think I'm ready to deal with my dad now
They're really enthusiastic, mention that they think it's great at every opportunity, and can't understand when someone is underwhelmed by the object of their admiration....
There is no God, and Dirac is his prophet.