#world #status #workflow

bin+lib hello-world-in-rust

Hello World!

2 releases

0.1.1 Sep 5, 2024
0.1.0 May 13, 2024

#715 in Rust patterns

Download history 112/week @ 2024-08-31 20/week @ 2024-09-07 18/week @ 2024-09-14 18/week @ 2024-09-21 5/week @ 2024-09-28

89 downloads per month

MIT license

7KB

version workflow status codecov status

Hello World

Hello world in Rust!

Run the binary:

hello-world-in-rust
# Output: hello world!

Execute as crate:

let next_word = hello_world::hello();

Hello World Derive

Add macro to print out the hello world message in a function.

#[hello_world]
fn main {
    // The macro will generate println! to print the hello world message here.
}

lib.rs:

Provides a function hello() that returns the word "world!".

Example

let what = hello_world::hello();
assert_eq!(what, "world!".to_string());

No runtime deps