From 72724432a941a6d0365b7614a7f1b37a16ac271a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Thu, 26 Sep 2024 17:09:34 +0200 Subject: [PATCH] Rust project structure --- Cargo.lock | 7 +++++++ Cargo.toml | 7 +++++++ rust-toolchain.toml | 4 ++++ rustfmt.toml | 7 +++++++ src/main.rs | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 rust-toolchain.toml create mode 100644 rustfmt.toml create mode 100644 src/main.rs diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..a2012d6 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "playground" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..e75b140 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "playground" +version = "0.1.0" +edition = "2021" +authors = ["Piotr Mikołajczyk "] + +[dependencies] diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..a3d6088 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.79" +components = [ "rustfmt", "clippy", "rust-src" ] +targets = [ "x86_64-unknown-linux-gnu" ] diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..af85000 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,7 @@ +edition = "2021" +use_field_init_shorthand = true +reorder_modules = true + +imports_granularity = "Crate" +group_imports = "StdExternalCrate" +reorder_imports = true diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}