From 9d1fb02b11cfbddebb6c482b7ef4cb437742b888 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 27 Jun 2024 14:15:44 +0200 Subject: [PATCH] doc updates --- Cargo.lock | 4 ++++ Cargo.toml | 2 +- README.md | 41 ++++++++++++++++++++++++++++++--- members/hello-world/Cargo.toml | 6 +++++ members/hello-world/src/main.rs | 3 +++ todo.norg | 0 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 members/hello-world/Cargo.toml create mode 100644 members/hello-world/src/main.rs delete mode 100644 todo.norg diff --git a/Cargo.lock b/Cargo.lock index ea09365..62a5890 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1074,6 +1074,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hello-world" +version = "0.1.0" + [[package]] name = "hermit-abi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 7330c8d..eca8876 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ members = [ "members/onlytoken", "members/sqlite-demo", "members/diesel-demo", - "members/ptlog", + "members/ptlog", "members/hello-world", ] default-members = [ ".", diff --git a/README.md b/README.md index 2258f9d..5e71983 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,46 @@ # Rust basics This project contains various smaller rust projects, often made by myself to -gain more understanding with a topic or dependency. +gain more understanding with a topic or dependency. It contains the absolute +basics of the language, the more advanced topics, but also demos on various dependencies. + +**Basics** +* [echargs](./members/echargs/) +* [shortc](./members/shortc/) +* [hello-world](./members/hello-world/) +* [revsqrt](./members/revsqrt/) + +**Intermediate** +* [mpsc](./members/mpsc/) +* [mpsc-full](./members/mpsc-full/) +* [panic-calm](./members/panic-calm/) +* [socker](./members/socker/) + +**Dependencies** +* [serde-json-demo](./members/serde-json-demo/) +* [claptest](./members/claptest/) +* [ptlog](./members/ptlog/) +* [slog-demo](./members/slog-demo/) +* [sqlite-demo](./members/sqlite-demo/) + +**Advanced Dependencies** +* [diesel-demo](./members/diesel-demo/) +* [tokio-send-sync](./members/tokio-send-sync/) +* [tokryon](./members/tokryon/) +* [cucumber-demo](./members/cucumber-demo/) +* [criterion-demo](./members/criterion-demo/) +* [rest](./members/rest/) +* [rest-queued](./members/rest-queued/) ## Rust unsafe Unsafe rust offers many possibilities otherwise locked from rust, which might cause undefined behavior (or are dubbed unsafe for other reasons). Let's be -honest, they are hacks. But they can have fun uses and are sometimes interesting -to explore, if only to see how the underlying system works. +honest, they are often hacks. But they can have fun uses and are sometimes +interesting to explore, if only to see how the underlying system works. + +Unsafe rust also has important uses when using programs developed in other +languages (like C or C++) or when manipulation of bits, bytes, and memory is +in needed (sorting algorithms). + +See [rs-unsafe](rs-unsafe) for more. diff --git a/members/hello-world/Cargo.toml b/members/hello-world/Cargo.toml new file mode 100644 index 0000000..1b85728 --- /dev/null +++ b/members/hello-world/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "hello-world" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/members/hello-world/src/main.rs b/members/hello-world/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/members/hello-world/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/todo.norg b/todo.norg deleted file mode 100644 index e69de29..0000000