library_crate

Crates.iolibrary_crate
lib.rslibrary_crate
version0.1.2
sourcesrc
created_at2020-01-19 13:13:19.637323
updated_at2020-01-19 13:33:37.53561
descriptionFirst Welcome Library Crate
homepagehttps://github.com/SyedHussain1988/library_crate.git
repositoryhttps://github.com/SyedHussain1988/library_crate
max_upload_size
id200104
size14,182
Syed Hussain Ahmed Shah (SyedHussain1988)

documentation

README

First Welcome Library Crate

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

library_crate = "0.1.2"

your cargo.toml file should look like this:

[package]
name = "library_crate"
version = "0.1.2"
authors = ["SyedHussainAhmed121 <shas_virgo121@yahoo.com>"]
edition = "2018"

[dependencies]
library_crate = "0.1.2"

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

use library_crate;
fn main() {
    println!("Hello, world!");
    library_crate::welcome();
}

following will also work:

use library_crate::welcome;
fn main() {
    println!("Hello, world!");
    welcome();
    }

now cargo run for results

Commit count: 5

cargo fmt