module1

Crates.iomodule1
lib.rsmodule1
version0.1.3
sourcesrc
created_at2019-10-12 10:37:26.497256
updated_at2019-10-12 15:33:56.693284
descriptionHello, Crates from PIAIC Extra Class Students
homepagehttps://github.com/imran82ali/module1
repositoryhttps://github.com/imran82ali/module1
max_upload_size
id171886
size13,939
Imran Ali (imran82ali)

documentation

README

Sample Crate for Student Learning

This is a demo rust library published on crates.io

to use this library you have to add following line in dependency section of cargo.toml

module1 = "0.1.3"

your cargo.toml file should look like this:

[package]
name = "hello_world"
version = "0.1.0"
authors = ["imran82ali <code.imranali@gmail.com>"]
edition = "2018"

[dependencies]
module1 = "0.1.3"

In src/main.rs you can use like this:

use module1;
fn main() {
    println!("Hello, world!");
    module1::hello();
}

following will also work:

use module1::hello;
fn main() {
    println!("Hello, world!");
    hello();
    }

now cargo run for results

Commit count: 8

cargo fmt