From 79314ac7e44cf6e4af1a8a740eae5e69d4c5524c Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:00:49 -0500 Subject: [PATCH 1/6] feat: add Rust Hello World package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created a basic Rust binary package that prints Hello, world! Includes standard cargo project structure with Cargo.toml and src/main.rs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .gitignore | 1 + Cargo.lock | 7 +++++++ Cargo.toml | 6 ++++++ src/main.rs | 3 +++ 4 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..ea8c4bf7f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..4340fcb63 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "rust-hello-world" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..930df0dba --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "rust-hello-world" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 000000000..e7a11a969 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} From 6bc9a6f937b84550217b5d96df4b2773211c4ceb Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:04:10 -0500 Subject: [PATCH 2/6] docs: add documentation for Rust Hello World package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs.md diff --git a/docs.md b/docs.md new file mode 100644 index 000000000..5a85dcb6f --- /dev/null +++ b/docs.md @@ -0,0 +1,36 @@ +# Noridoc: rust-hello-world + +Path: @/.worktrees/rust-hello-world + +### Overview + +- Binary Rust package serving as a minimal "Hello World" example +- Verifies Rust toolchain installation and basic project setup (rustc 1.91.0, cargo 1.91.0) +- Uses standard Cargo project structure with src/main.rs entry point +- Edition 2024 - latest Rust edition available + +### How it fits into the larger codebase + +- Located in a git worktree (separate working directory) to maintain isolation from the main monorepo +- Does not affect main repository commits since .worktrees/ is gitignored at @/.gitignore +- Demonstrates the first Rust infrastructure setup for the Nori system +- Serves as a template for future Rust packages or can be replaced with actual project code +- No dependencies on other parts of the monorepo; entirely self-contained + +### Core Implementation + +- Entry point: src/main.rs contains a simple println!("Hello, world!") implementation +- Build configuration: Cargo.toml defines package metadata (name: rust-hello-world, version: 0.1.0, edition: 2024) +- Build output directory: target/ (gitignored via local .gitignore) +- Cargo.lock tracks dependency versions (currently no external dependencies) +- No dependencies defined, pure standard library usage + +### Things to Know + +- This is a binary crate (executable), not a library crate +- The gitignored .worktrees/ directory means this package does not integrate with the main repository version control +- Rust 1.91.0 is the minimum required toolchain - defined by rust-toolchain.toml if present or system default +- target/ build artifacts are local to the worktree and gitignored +- The package can be compiled with `cargo build` or run directly with `cargo run` + +Created and maintained by Nori. From 2a5c72c9eeb9c1b15c85740500035a167880ddc2 Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:15:54 -0500 Subject: [PATCH 3/6] ci: add GitHub Actions workflow for Rust CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds automated checks for: - Code formatting (cargo fmt --check) - Linting (cargo clippy -D warnings) - Tests (cargo test --verbose) Runs on push to main and all pull requests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/rust-ci.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/rust-ci.yml diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml new file mode 100644 index 000000000..3adbd7597 --- /dev/null +++ b/.github/workflows/rust-ci.yml @@ -0,0 +1,42 @@ +name: Rust CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Check formatting + run: cargo fmt --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Run clippy + run: cargo clippy -- -D warnings + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --verbose From b143b2b632d3eaccca83cc9528a7d7968e46a82b Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:18:29 -0500 Subject: [PATCH 4/6] docs: update documentation with CI/CD workflow info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs.md b/docs.md index 5a85dcb6f..11c39a8ca 100644 --- a/docs.md +++ b/docs.md @@ -32,5 +32,9 @@ Path: @/.worktrees/rust-hello-world - Rust 1.91.0 is the minimum required toolchain - defined by rust-toolchain.toml if present or system default - target/ build artifacts are local to the worktree and gitignored - The package can be compiled with `cargo build` or run directly with `cargo run` +- CI/CD: GitHub Actions workflow at @/.github/workflows/rust-ci.yml runs automated checks on PRs and pushes to main: + - cargo fmt --check (formatting) + - cargo clippy -- -D warnings (linting, treats warnings as errors) + - cargo test --verbose (test suite) Created and maintained by Nori. From 353d8d8c344fbb22144b494e50d7ac7b3b0fc33c Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:25:54 -0500 Subject: [PATCH 5/6] refactor: split CI into separate PR and main workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pr-ci.yml runs on pull_request events only - main-ci.yml runs on push to main only - Removes unified rust-ci.yml workflow This allows future differentiation between PR checks (fast feedback) and main branch checks (comprehensive validation + deployment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/main-ci.yml | 40 ++++++++++++++++++++ .github/workflows/{rust-ci.yml => pr-ci.yml} | 4 +- 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main-ci.yml rename .github/workflows/{rust-ci.yml => pr-ci.yml} (94%) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml new file mode 100644 index 000000000..146948679 --- /dev/null +++ b/.github/workflows/main-ci.yml @@ -0,0 +1,40 @@ +name: Main CI + +on: + push: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Check formatting + run: cargo fmt --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Run clippy + run: cargo clippy -- -D warnings + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --verbose diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/pr-ci.yml similarity index 94% rename from .github/workflows/rust-ci.yml rename to .github/workflows/pr-ci.yml index 3adbd7597..b8552397c 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -1,8 +1,6 @@ -name: Rust CI +name: PR CI on: - push: - branches: [ main ] pull_request: branches: [ main ] From 140adb57f1c7773735de418ae42211a08eccc719 Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Wed, 5 Nov 2025 19:28:02 -0500 Subject: [PATCH 6/6] docs: update CI/CD documentation for separate workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs.md b/docs.md index 11c39a8ca..ae80efbfc 100644 --- a/docs.md +++ b/docs.md @@ -32,9 +32,9 @@ Path: @/.worktrees/rust-hello-world - Rust 1.91.0 is the minimum required toolchain - defined by rust-toolchain.toml if present or system default - target/ build artifacts are local to the worktree and gitignored - The package can be compiled with `cargo build` or run directly with `cargo run` -- CI/CD: GitHub Actions workflow at @/.github/workflows/rust-ci.yml runs automated checks on PRs and pushes to main: - - cargo fmt --check (formatting) - - cargo clippy -- -D warnings (linting, treats warnings as errors) - - cargo test --verbose (test suite) +- CI/CD: Separate GitHub Actions workflows for different Git events: + - @/.github/workflows/pr-ci.yml runs on pull requests + - @/.github/workflows/main-ci.yml runs on pushes to main + - Both run: cargo fmt --check (formatting), cargo clippy -- -D warnings (linting), cargo test --verbose (tests) Created and maintained by Nori.