summaryrefslogtreecommitdiff
path: root/rust/hello-world/src/lib.rs
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2020-06-02 19:29:59 +0200
committerDimitri Sokolyuk <demon@dim13.org>2020-06-02 19:29:59 +0200
commit69a68b10a12af3f85842eeb7586e62ff780f2f5f (patch)
tree7e8eb4fdcf51a32f41c20ecb33dfe8271bf0340c /rust/hello-world/src/lib.rs
parent31a1eaa9c0d694b9913a637dd4e5472c22152886 (diff)
Add rust track
Diffstat (limited to 'rust/hello-world/src/lib.rs')
-rw-r--r--rust/hello-world/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/hello-world/src/lib.rs b/rust/hello-world/src/lib.rs
new file mode 100644
index 0000000..f147ab7
--- /dev/null
+++ b/rust/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 {
+ "Goodbye, World!"
+}