Skip to content

Migration to v1.3.0

Steps to migrate from v1.2.0 to v1.3.0.

The project root becomes your single workspace: - documentation moves to doc/ - the workspace manifest moves to the project root - .cargo becomes .llm.

Why

There was a fair bit of friction. Folks (myself included), have a habit of opening the project root in their IDE. Opening src/ made it a bit awkward; especially if you wanted to change CI configuration, or repository root readme.

It was also a bit awkward with tools like VSCode, recent folder would show as src, not the project name.

As a compromise, I'm moving doc to the top level again, and adding a root Cargo.toml. Meaning you can work from the root.

Actual source code stays in src/; keeping folder amount low/down/clean.

Move src/doc to doc

Move the entire src/doc/ tree to the root:

src/doc/                          →  doc/
src/doc/.gitignore                →  doc/.gitignore
src/doc/.vscode/settings.json     →  doc/.vscode/settings.json
src/doc/README.md                 →  doc/README.md
src/doc/start_docs.py             →  doc/start_docs.py
src/doc/mkdocs.yml                →  doc/mkdocs.yml
src/doc/docs/...                  →  doc/docs/...

Update .github/workflows/deploy-mkdocs.yml

    push:
      branches: [main]
      paths:
-       - "src/doc/mkdocs.yml"
-       - "src/doc/docs/**"
+       - "doc/mkdocs.yml"
+       - "doc/docs/**"
    pull_request:
      branches: [main]
      paths:
-       - "src/doc/mkdocs.yml"
-       - "src/doc/docs/**"
+       - "doc/mkdocs.yml"
+       - "doc/docs/**"

    - name: Deploy MkDocs
      uses: Reloaded-Project/devops-mkdocs@v1
      with:
-       requirements: ./src/doc/docs/requirements.txt
+       requirements: ./doc/docs/requirements.txt
        publish-to-pages: ${{ github.event_name == 'push' }}
        checkout-current-repo: true
-       config-file: ./src/doc/mkdocs.yml
+       config-file: ./doc/mkdocs.yml

No content changes needed inside the moved files. start_docs.py uses Path(__file__).parent which remains correct. VSCode setting exclusions for venv/ and __pycache__/ use relative paths and remain valid.

Move the workspace manifest to the root

Move src/Cargo.toml to Cargo.toml and prefix workspace members with src/:

 [workspace]
 resolver = "2"
-members = ["your-project", "cli"]
+members = ["src/your-project", "src/cli"]

Crates stay in place; crate-to-crate relative paths (../your-project) and the C# bindings csproj need no changes. Build artifacts move from src/target/ to target/; you can delete the old src/target/.

Update .github/workflows/rust.yml

     paths:
       - "src/**"
+      - "Cargo.toml"
+      - "Cargo.lock"

         with:
-          manifest-path: src/Cargo.toml
+          manifest-path: Cargo.toml

           rust-project-path: src/your-project
-          workspace-path: src
+          workspace-path: .
           pgo-project-path: src/your-project

-          rust-project-path: ./src
+          rust-project-path: ./

       - name: Check documentation is valid
-        working-directory: src
         env:
           RUSTDOCFLAGS: "-D warnings"

       - name: Run linter
-        working-directory: src
         run: cargo clippy --workspace --all-features --target ${{ matrix.target }} -- -D warnings

Change these inputs in every external action call:

  • devops-rust-lightweight-binary: workspace-path: .
  • devops-rust-test-and-coverage: rust-project-path: ./

Leave these unchanged:

  • rust-project-path: src/your-project
  • pgo-project-path
  • cbindgen config-file: ../../.github/... (resolves from the crate directory)
  • C# binding paths

Update .github/dependabot.yml

   - package-ecosystem: "cargo"
-    directory: "src"
+    directory: "/"

Merge VSCode configuration into the root

VSCode only reads .vscode/ from the opened workspace root. Merge src/.vscode/settings.json into .vscode/settings.json and move src/.vscode/tasks.json to .vscode/tasks.json.

Task commands run from the root now; update the paths inside:

-  cargo watch -x "test" -w your-project/src
+  cargo watch -x "test" -w src/your-project/src

-  cbindgen --config ../.github/cbindgen_c.toml --output bindings/c/your-project.h your-project
+  cbindgen --config .github/cbindgen_c.toml --output src/bindings/c/your-project.h src/your-project

-  cargo install cargo-fuzz --quiet && cargo +nightly fuzz list
+  cargo install cargo-fuzz --quiet && cd src && cargo +nightly fuzz list

The fuzz task keeps cd src: cargo fuzz runs from the folder containing fuzz/.

Rename src/.cargo to src/.llm

The folder holds agent guidance and verification scripts, not cargo configuration. Rename it.

src/.cargo/verify.sh              →  src/.llm/verify.sh
src/.cargo/verify.ps1             →  src/.llm/verify.ps1
src/.cargo/general.md             →  src/.llm/general.md
src/.cargo/performance.md         →  src/.llm/performance.md
src/.cargo/documentation.md       →  src/.llm/documentation.md

Update the references in src/AGENTS.md:

-After changes, run `.cargo/verify.{sh,ps1}` before returning.
-If relevant to your review task, read `.cargo/{general,performance,documentation}.md`.
+After changes, run `.llm/verify.{sh,ps1}` before returning.
+If relevant to your review task, read `.llm/{general,performance,documentation}.md`.

Update .gitignore

Build and coverage outputs now land at the root:

 # Local Code Review
 .vscode/local-reviews/
-src/.vscode/local-reviews/
+
+# Build Outputs
+/target
+
+# Profiling files
+perf.data.old
+perf.data
+flamegraph.svg
+
+# Code Coverage
+cobertura.xml
+tarpaulin-report.html

Update the template version marker

Update .github/template-version.txt to reflect the new version:

- reloaded-templates-rust:1.2.0
+ reloaded-templates-rust:1.3.0