From ec4bac560153186b9689224a573072502616e719 Mon Sep 17 00:00:00 2001 From: Ry2X <45420571+ry2x@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:17:51 +0900 Subject: [PATCH 1/4] FEAT: Add toolchain --- rust-toolchain.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..cb549b9 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,15 @@ +[toolchain] +channel = "stable" + +components = [ + "rustfmt", + "clippy", + "rust-analysis", + "rust-docs", + "rust-src" +] + +targets = [ + "x86_64-unknown-linux-gnu", + "aarch64-unknown-linux-gnu" +] \ No newline at end of file From c1140a126ea72ce78092d4f5768d376894a495f9 Mon Sep 17 00:00:00 2001 From: Ry2X <45420571+ry2x@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:18:02 +0900 Subject: [PATCH 2/4] FEAT: Add linting configuration --- Cargo.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ac54ddc..3ab05d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,3 +30,21 @@ lto = true codegen-units = 1 panic = "abort" strip = true + +[lints.rust] +unsafe_code = "forbid" +missing_debug_implementations = "warn" + +[lints.clippy] +# Enable for educational purposes, but don't block CI +pedantic = "warn" +nursery = "warn" + +# For avoid .unwrap() usage +unwrap_used = "warn" + +# Float comparisons can be problematic +float_cmp = "warn" + +# Allow many arguments in functions for GUI code +#too_many_arguments = "allow" \ No newline at end of file From 194fb4748a93b29278e4e4294b01e2e067081a93 Mon Sep 17 00:00:00 2001 From: Ry2X <45420571+ry2x@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:21:01 +0900 Subject: [PATCH 3/4] FEAT: Add CI workflow for automated testing and code checks --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..379265c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + pull_request: + types: [opened, ready_for_review, synchronize, reopened] + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo build + uses: Swatinem/rust-cache@v2 + + - name: Check code formatting + run: cargo fmt --all -- --check + + - name: Run clippy Check + run: cargo clippy -- -D warnings + + - name: Run tests + run: cargo test --all --verbose From 77ae3ff02cd7406849ee566f346677fa8c21e21a Mon Sep 17 00:00:00 2001 From: Ry2X <45420571+ry2x@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:44:21 +0900 Subject: [PATCH 4/4] FEAT: Update CI configuration and improve linting rules --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 379265c..d9398bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: run: cargo fmt --all -- --check - name: Run clippy Check - run: cargo clippy -- -D warnings + run: cargo clippy -- -D clippy::correctness - name: Run tests run: cargo test --all --verbose diff --git a/Cargo.toml b/Cargo.toml index 3ab05d1..06914ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ missing_debug_implementations = "warn" pedantic = "warn" nursery = "warn" -# For avoid .unwrap() usage +# To avoid .unwrap() usage unwrap_used = "warn" # Float comparisons can be problematic