diff --git a/README.md b/README.md index cac4207..676d61e 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ - [C](#c) - [C++](#c-1) - [OCaml](#ocaml) +- [Rust](#rust) - [Typescript](#typescript) ## C @@ -44,6 +45,13 @@ Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go! > (uri https://dev.example.com/project.git)) > ``` +## Rust + +Copy and paste [`rust/`](./rust/) directory, and you should be good to go! + +- Remember to change values in the [`Cargo.toml`](./rust/Cargo.toml). +- **Run `cargo run` to run the program.** + ## Typescript Copy and paste [`typescript/`](./typescript/) directory, and you should be good to go! diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/rust/.vscode/extensions.json b/rust/.vscode/extensions.json new file mode 100644 index 0000000..74c151f --- /dev/null +++ b/rust/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["rust-lang.rust-analyzer"] +} diff --git a/rust/.vscode/settings.json b/rust/.vscode/settings.json new file mode 100644 index 0000000..4a19afc --- /dev/null +++ b/rust/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.tabSize": 2, + "editor.insertSpaces": false, + + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + + "rust-analyzer.check.command": "clippy" +} diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..21d186b --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..083d508 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2021" +publish = false +license = "AGPL-3.0-or-later" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/rust/src/main.rs b/rust/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/rust/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}