Slashdot Mirror


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:
  • 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.

2 of 304 comments (clear)

  1. The future of rustlang is tied up with Mozilla by mnooning · · Score: 5, Insightful

    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?

  2. Re:What happens to Rust when Mozilla is gone? by ShanghaiBill · · Score: 5, Funny

    As C has been constantly in the top 3 languages that coder positions are offered for

    But those "coder positions" are for white males only. C was designed in the 1960s, when colonialism was still rampant, and that is reflected in the language design. C ignores array bounds just as the imperial powers ignored the boundaries of tribal societies. Rust can free us from syntactic oppression, and provides "safe spaces" for everyone's data regardless of their culture or previous gender.