Closed
Description
The rustpkg manual has the following statement:
rustpkg install foo
builds the libraries and/or executables that are targets forfoo
. IfRUST_PATH
is declared as an environment variable, then rustpkg installs the libraries and executables into thelib
andbin
subdirectories of the first entry inRUST_PATH
.
I am finding that this is not the case. See the following reproduction:
$ mkdir -p ~/devel/MyLib/src/MyLib
$ vim ~/devel/MyLib/src/MyLib/{test,lib}.rs
$ cat ~/devel/MyLib/src/MyLib/lib.rs
#[crate_type="lib"];
#[crate_id="MyLib#0.2"];
pub mod MyMod {
pub fn hello() -> ~str { ~"world" }
}
$ cat ~/devel/MyLib/src/MyLib/test.rs
extern mod MyLib;
use MyLib::MyMod;
#[test]
fn test1() {
MyMod::hello();
}
$ mkdir -p ~/devel/MyProject
$ cd ~/devel/MyProject
$ env RUST_PATH=~/devel/MyProject:~/devel/MyLib ~/devel/rust-git/prefix/bin/rustpkg install MyLib
WARNING: The Rust package manager is experimental and may be unstable
note: Installed package MyLib-0.0 to /Users/achin/devel/MyLib
note: Installed package MyLib-0.0 to /Users/achin/devel/MyProject
$ find ~/devel/MyLib/
/Users/achin/devel/MyLib/
/Users/achin/devel/MyLib//bin
/Users/achin/devel/MyLib//build
/Users/achin/devel/MyLib//build/x86_64-apple-darwin
/Users/achin/devel/MyLib//build/x86_64-apple-darwin/MyLib
/Users/achin/devel/MyLib//build/x86_64-apple-darwin/MyLib/libMyLib-e6b6b1b1-0.2.dylib
/Users/achin/devel/MyLib//build/x86_64-apple-darwin/MyLib/MyLibtest
/Users/achin/devel/MyLib//lib
/Users/achin/devel/MyLib//lib/x86_64-apple-darwin
/Users/achin/devel/MyLib//lib/x86_64-apple-darwin/libMyLib-e6b6b1b1-0.2.dylib
/Users/achin/devel/MyLib//src
/Users/achin/devel/MyLib//src/MyLib
/Users/achin/devel/MyLib//src/MyLib/lib.rs
/Users/achin/devel/MyLib//src/MyLib/test.rs
$ find ~/devel/MyProject/
/Users/achin/devel/MyProject/
/Users/achin/devel/MyProject//bin
/Users/achin/devel/MyProject//lib
/Users/achin/devel/MyProject//lib/x86_64-apple-darwin
/Users/achin/devel/MyProject//rustpkg_db.json
$ ~/devel/rust-git/prefix/bin/rustpkg --version
WARNING: The Rust package manager is experimental and may be unstable
/Users/achin/devel/rust-git/prefix/bin/rustpkg 0.9-pre (5c24bfa 2013-12-19 17:11:40 -0800)
host: x86_64-apple-darwin
Note the test.rs file seems to be affecting the rustpkg behavior:
$ rm ~/devel/MyLib/src/MyLib/test.rs
$ rm rustpkg_db.json
$ env RUST_PATH=~/devel/MyProject:~/devel/MyLib ~/devel/rust-git/prefix/bin/rustpkg install MyLib
WARNING: The Rust package manager is experimental and may be unstable
note: Installed package MyLib-0.0 to /Users/achin/devel/MyProject
$ find ~/devel/MyProject/
/Users/achin/devel/MyProject/
/Users/achin/devel/MyProject//bin
/Users/achin/devel/MyProject//lib
/Users/achin/devel/MyProject//lib/x86_64-apple-darwin
/Users/achin/devel/MyProject//lib/x86_64-apple-darwin/libMyLib-e6b6b1b1-0.2.dylib
/Users/achin/devel/MyProject//rustpkg_db.json
cc: @catamorphism
Metadata
Metadata
Assignees
Labels
No labels