hello_rusty_worlds

Crates.iohello_rusty_worlds
lib.rshello_rusty_worlds
version0.1.0
sourcesrc
created_at2016-01-12 04:21:47.531514
updated_at2016-01-12 04:21:47.531514
descriptionA hello world crate with automated testing, documentation, continuous integration, tested example code, implemented as a library with a command line tool. Supports Sol and all its planets, not just 'Hello (unspecified) world!'
homepagehttps://github.com/Densaugeo/hello_rusty_worlds
repositoryhttps://github.com/Densaugeo/hello_rusty_worlds
max_upload_size
id3881
size22,423
Densaugeo (Densaugeo)

documentation

https://densaugeo.github.io/hello_rusty_worlds/

README

hello_rusty_worlds

A hello world crate with automated testing, documentation, continuous integration, tested example code, implemented as a library with a command line tool. Supports Sol and all its planets, not just 'Hello (unspecified) world!'

npm Build Status

Rustdoc

https://densaugeo.github.io/hello_rusty_worlds/

Working lib example

Add to Cargo.toml dependencies section:

[dependencies]
hello_rusty_worlds = { git = "https://github.com/Densaugeo/hello_rusty_worlds" }

Then call from your code using extern crate:

extern crate hello_rusty_worlds;

fn main() {
  println!("{}", hello_rusty_worlds::hello_world(3).unwrap()); // Prints "Hello Earth!"
}

Working bin example

Install the command line tool through cargo install:

[lunariel@morpheus ~]$ cargo install --git https://github.com/Densaugeo/hello_rusty_worlds
Updating git repository `https://github.com/Densaugeo/hello_rusty_worlds`
Compiling hello_rusty_worlds v0.1.0 (https://github.com/Densaugeo/hello_rusty_worlds#b20dd5c0)
Installing /home/lunariel/.cargo/bin/hello-world
be sure to add `/home/lunariel/.cargo/bin` to your PATH to be able to run the installed binaries

As the message notes, you may need to add cargo's bin folder to your $PATH. This will enable all command line tools installed through cargo. On linux:

[lunariel@morpheus ~]$ export PATH=$PATH:/home/lunariel/.cargo/bin

The binary is installed under the name hello-world, and takes one argument, a planet's number:

[lunariel@morpheus ~]$ hello-world 1
Hello Mercury!
Commit count: 11

cargo fmt