Skip to content

Docs/internals architecture - #307

Open
sudha09-git wants to merge 2 commits into
mohu-org:mainfrom
sudha09-git:docs/internals-architecture
Open

Docs/internals architecture#307
sudha09-git wants to merge 2 commits into
mohu-org:mainfrom
sudha09-git:docs/internals-architecture

Conversation

@sudha09-git

@sudha09-git sudha09-git commented Jul 17, 2026

Copy link
Copy Markdown

the issue is resolved

Summary by CodeRabbit

  • Documentation

    • Added an architecture guide describing the project’s layered Rust workspace, crate responsibilities, dependencies, and planned interoperability support.
    • Added references to related architecture and design documentation for easier navigation.
  • Chores

    • Excluded the generated documentation book directory from version control.

Signed-off-by: Sudha Rajput <rajputsudha034@gmail.com>
Signed-off-by: Sudha Rajput <rajputsudha034@gmail.com>
@sudha09-git
sudha09-git requested a review from Bbn08 as a code owner July 17, 2026 15:27
@github-actions

Copy link
Copy Markdown

PR Check Summary

Item Value
Branch docs/internals-architecture
Changed crates none
Files changed 2

CI will run: build, test, clippy, fmt, cargo-deny, DCO, semver.
Reviewer assigned from CODEOWNERS.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a layered architecture page for the mohu Rust workspace, documents planned Python bindings and related references, and updates .gitignore to exclude docs/book/.

Changes

Architecture documentation

Layer / File(s) Summary
Architecture page and documentation output handling
docs/src/internals/architecture.md, .gitignore
Documents workspace layers, crate responsibilities, planned Python interoperability, and related documentation; ignores the generated docs/book/ directory.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: bbn08

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding internal architecture documentation and related docs build ignore updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/internals/architecture.md`:
- Around line 3-6: Update the layered-crates description in the architecture
documentation to match the manifest dependency graph: state that mohu-ops and
mohu-stats depend on mohu-core, while mohu-random, mohu-special, and mohu-fft
depend directly on foundation crates rather than all routing through the
dispatch layer. Preserve the existing explanation of workspace layering and
composable crate usage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b591aa4d-7726-4de5-981f-85d5fa7dc872

📥 Commits

Reviewing files that changed from the base of the PR and between 3c07775 and b6e2ac1.

📒 Files selected for processing (2)
  • .gitignore
  • docs/src/internals/architecture.md

Comment on lines +3 to +6
mohu is organized as a Cargo workspace of layered crates. Each layer only depends on
the layers below it, which keeps compile times low and makes it possible to use
pieces of mohu (e.g. just the error types, or just the dtype system) without pulling
in the whole library.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n 'mohu-(error|dtype|buffer|array|core|simd|ufunc|index|ops|fft|random|special|stats|sparse|masked|io|testing)' \
  --glob 'Cargo.toml' --glob '!target/**'

Repository: mohu-org/mohu

Length of output: 151


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Top-level Cargo.toml files:\n'
git ls-files '**/Cargo.toml'

printf '\nWorkspace members from root Cargo.toml:\n'
sed -n '1,220p' Cargo.toml

printf '\nDependency lines mentioning mohu crates across Cargo.toml files:\n'
rg -n 'mohu-' --glob 'Cargo.toml' --glob '!target/**' .

Repository: mohu-org/mohu

Length of output: 15259


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show all Cargo.toml files and their first 200 lines, enough to inspect workspace and dependencies.
while IFS= read -r f; do
  echo "===== $f ====="
  sed -n '1,200p' "$f"
  echo
done < <(git ls-files '**/Cargo.toml')

Repository: mohu-org/mohu

Length of output: 203


🏁 Script executed:

#!/bin/bash
set -euo pipefail

find . -name Cargo.toml -not -path '*/target/*' -print | sort

Repository: mohu-org/mohu

Length of output: 690


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'architecture.md:\n'
cat -n docs/src/internals/architecture.md | sed -n '1,120p'

printf '\nCompute/dispatch crate dependencies:\n'
for f in \
  crates/mohu-simd/Cargo.toml \
  crates/mohu-ufunc/Cargo.toml \
  crates/mohu-index/Cargo.toml \
  crates/mohu-ops/Cargo.toml \
  crates/mohu-fft/Cargo.toml \
  crates/mohu-random/Cargo.toml \
  crates/mohu-special/Cargo.toml \
  crates/mohu-stats/Cargo.toml
do
  echo "===== $f ====="
  sed -n '1,120p' "$f"
  echo
done

Repository: mohu-org/mohu

Length of output: 11113


Reword the compute-layer description to match the manifest graph. The workspace layering is fine, but the compute crates do not all route through the dispatch layer: mohu-ops and mohu-stats depend on mohu-core, while mohu-random, mohu-special, and mohu-fft depend on foundation crates directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/internals/architecture.md` around lines 3 - 6, Update the
layered-crates description in the architecture documentation to match the
manifest dependency graph: state that mohu-ops and mohu-stats depend on
mohu-core, while mohu-random, mohu-special, and mohu-fft depend directly on
foundation crates rather than all routing through the dispatch layer. Preserve
the existing explanation of workspace layering and composable crate usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant