From da0fec405edd592d9ae7c658cb80fdc652671c37 Mon Sep 17 00:00:00 2001 From: Federico I Date: Sat, 14 Mar 2020 19:21:02 +0000 Subject: [rust] Hello World --- hello-world/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 hello-world/src/lib.rs (limited to 'hello-world/src/lib.rs') diff --git a/hello-world/src/lib.rs b/hello-world/src/lib.rs new file mode 100644 index 0000000..8f68273 --- /dev/null +++ b/hello-world/src/lib.rs @@ -0,0 +1,5 @@ +// The &'static here means the return type has a static lifetime. +// This is a Rust feature that you don't need to worry about now. +pub fn hello() -> &'static str { + "Hello, World!" +} -- cgit v1.2.3