3 ms·
One of us misread the article. I understood it to say that they want to rewrite the core of the Python code to Rust so that they don't have to wait for the Pyth
by jxcl 9y ago
One of us misread the article. I understood it to say that they want to rewrite the core of the Python code to Rust so that they don't have to wait for the Python interpreter to start every time someone uses the hg command. The Rust binary will be able to call Python code, which is basically a complete reversal of what they have now.
- JDevlieghere 9y agoThis is how I understood it as well.
- oconnor663 9y agoI read it as they want it to be possible for some commands to be written in pure rust, but that they expect to maintain the majority of their current Python code.
- seba_dos1 9y agoIf it's already possible to write C extensions, then it's already possible to write Rust extensions, so that would be a non-news.
- oconnor663 9y agoI think the idea is that in order to avoid Python interpreter startup time on commands that are primarily written in Rust, they also want to have the main function written in Rust, with Python interpreter startup being an optional codepath (that a majority of the codebase still depends on).
- the_mitsuhiko 9y ago> One of us misread the article. I understood it to say that they want to rewrite the core of the Python code to Rust so that they don't have to wait for the Python interpreter to start every time someone uses the hg command. It would still use the Python interpreter internally but they want to skip it for some functionality like the basic command line interface. So they would embed the Python interpreter in their new distribution. However the Python code still just calls out to other Rust code.
- merb 9y ago> However the Python code still just calls out to other Rust code. this will probably be hard. calling back and forth is always harder than into a single direction.