[rust-dev] Deprecating rustpkg

SiegeLord slabode at aim.com
Tue Jan 28 08:46:28 PST 2014


On 01/27/2014 11:53 PM, Jeremy Ong wrote:
> I'm somewhat new to the Rust dev scene. Would anybody care to summarize
> roughly what the deficiencies are in the existing system in the interest
> of forward progress? It may help seed the discussion for the next effort
> as well.

I can only speak for myself, but here are some reasons why I abandoned 
rustpkg and switched to CMake.

Firstly, and overarchingly, it was the attitude of the project 
development with respect to issues. As a comparison, let me consider 
Rust the language. It is a pain to make my code pass the borrow check 
sometimes, the lifetimes are perhaps the most frustrating aspect of 
Rust. I put up with them however, because they solve a gigantic problem 
and are the keystone of Rust's safety-without-GC story. rustpkg also has 
many incredibly frustrating aspects, but they are there (in my opinion) 
arbitrarily and not as a solution to any real problem. When I hit them, 
I do not get the same sense of purposeful sacrifice I get with Rust's 
difficult points. Let me outline the specific issues I personally hit (I 
know of other ones, but I haven't encountered them personally).

Conflation of package id and source. That fact combined with the fact 
that to depend on some external package you have to write "extern mod = 
pkgid" meant that you needed to create bizarre directory structures to 
depend on locally developed packages (e.g. you'd have to put your 
locally developed project in a directory tree like so: 
github.com/SiegeLord/Project). This is not something I was going to do.

The package dependencies are written in the source file, which makes it 
onerous to switch between versions/forks. A simple package script would 
have solved it, but it wasn't present by design.

My repositories have multiple crates, and rustpkg is woefully 
under-equipped to handle that case. You cannot build them without 
dealing with pkg.rs, and using them from other projects seemed 
impossible too (the extern mod syntax wasn't equipped to handle multiple 
crates per package). This is particularly vexing when you have multiple 
example programs alongside your library. I was not going to split my 
repository up just because rustpkg wasn't designed to handle that case.

All of those points would be solved by having an explicit package 
description file/script which was THE overarching design non-goal of 
rustpkg. After that was made clear to me, I just ditched it and went to 
C++ style package "management" and a CMake build system.

-SL


More information about the Rust-dev mailing list