#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

#688 in Rust patterns

Download history 132/week @ 2024-09-03 10/week @ 2024-09-10 10/week @ 2024-09-17 16/week @ 2024-09-24 5/week @ 2024-10-01

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