diff options
Diffstat (limited to 'rust/hello-world/src/lib.rs')
| -rw-r--r-- | rust/hello-world/src/lib.rs | 5 |
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..8f68273 --- /dev/null +++ b/rust/hello-world/src/lib.rs | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | // The &'static here means the return type has a static lifetime. | ||
| 2 | // This is a Rust feature that you don't need to worry about now. | ||
| 3 | pub fn hello() -> &'static str { | ||
| 4 | "Hello, World!" | ||
| 5 | } | ||
