Jump to content
funtoo forums
gevious

Emerge rewrite in rust

Recommended Posts

I'm relatively unfamiliar with the portage codebase, but know it's written in Python. I'm a web developer and use Python for writing server side code. Recently I have been intrigued by the rust programming language. I'm considering learning the language but need a good project to help me. I thought that maybe doing a rewrite of emerge would be a project worth considering since rust will be as secure as Python but will run significantly quicker.

 

I'd love to hear if this is something worth doing and if it would be able to help the community in the future.

Share this post


Link to post
Share on other sites

I have no idea on the technical aspects but if emerge can be made quicker then it can only be a good thing as far as I'm concerned.

 

Is Python the real reason for emerge being slow ? What is time consuming is when emerge calculates dependencies. I think so. I perhaps am wrong. If I were right, I would look to Portage tree data structure.

 

Python code could be written in C or C++. Both are close together. Would it be faster, quicker ? That's the question.

Share this post


Link to post
Share on other sites

there is C++ rewrite, called paludis and it's not any faster. A new portage version we testing locally is a bit faster. But last years, indeed, it slowed at some point. From what I understand portage now re-calculates it's dependency tree from scratch each time and depending on pkg list  it can be really discouraging. Maybe, we can make this behavior improved or changed completely. I.e problem is not because portage written in python, but rather in what it trying to do. (too smart?) 

Share this post


Link to post
Share on other sites

there is C++ rewrite, called paludis and it's not any faster. A new portage version we testing locally is a bit faster. But last years, indeed, it slowed at some point. From what I understand portage now re-calculates it's dependency tree from scratch each time and depending on pkg list  it can be really discouraging. Maybe, we can make this behavior improved or changed completely. I.e problem is not because portage written in python, but rather in what it trying to do. (too smart?) 

 

That's what I meant in my previous post. That's the way Portage calculates dependencies.

Share this post


Link to post
Share on other sites

yes, bash is slow too, mainly because of readline library but still. The're several portage rewrites exist. paludis (C++), nix package manager (haskell), maybe others exist too. But they are mainly doing same as portage, i.e their existance dubious from point it's just portage (but in different lang). Devs who doesn't like python, created it without making anything revolutionary.  

Share this post


Link to post
Share on other sites

I would be leery of re-writing an important package management function in a language that (according to wikipedia) is at 1.0.0 Alpha stage.

 

I would be petrified after reading this on their front page

 

 

* In theory. Rust is a work-in-progress and may do anything it likes up to and including eating your laundry.

 

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×