]> git.cworth.org Git - rust-learning/commitdiff
server: Add the most minimal rust program possible
authorCarl Worth <cworth@cworth.org>
Mon, 9 Mar 2026 23:08:44 +0000 (16:08 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 12 Mar 2026 04:14:17 +0000 (21:14 -0700)
This is just the "hello, world" program one gets from running
"cargo init server" (which is literally what I did here).

I also added the .gitignore file for files that will be
generated by "cargo run".

.gitignore [new file with mode: 0644]
Cargo.toml [new file with mode: 0644]
src/main.rs [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..fa8d85a
--- /dev/null
@@ -0,0 +1,2 @@
+Cargo.lock
+target
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644 (file)
index 0000000..ff06670
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "server"
+version = "0.1.0"
+edition = "2024"
+
+[dependencies]
diff --git a/src/main.rs b/src/main.rs
new file mode 100644 (file)
index 0000000..e7a11a9
--- /dev/null
@@ -0,0 +1,3 @@
+fn main() {
+    println!("Hello, world!");
+}