Skip to content

Add missing Cargo.toml file and Flox resources#627

Merged
forstmeier merged 1 commit intomasterfrom
cargo-and-flox-updates
Sep 16, 2025
Merged

Add missing Cargo.toml file and Flox resources#627
forstmeier merged 1 commit intomasterfrom
cargo-and-flox-updates

Conversation

@forstmeier
Copy link
Copy Markdown
Collaborator

@forstmeier forstmeier commented Sep 16, 2025

Overview

Changes

  • add root Cargo.toml
  • update Flox dependencies for Rust

Comments

Stuff that's missing elsewhere.

Summary by CodeRabbit

  • Build
    • Set up a Rust workspace and registered the datamanager application as a member.
  • Chores
    • Expanded the development environment with the Rust toolchain (compiler, formatter, lints, source), Rust analyzer support, and system compilers.
    • Added platform-specific support for required system libraries and toolchains across macOS (Apple Silicon/Intel) and Linux (ARM64/x86_64), improving out-of-the-box setup and consistency for contributors.

@forstmeier forstmeier self-assigned this Sep 16, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 16, 2025

Walkthrough

Adds multiple toolchain and system package entries under [install] in .flox/env/manifest.toml with pkg-group and platform-specific systems. Updates Cargo.toml to define a workspace (resolver = "2") and include applications/datamanager as a member.

Changes

Cohort / File(s) Summary
Flox environment manifest
/.flox/env/manifest.toml
Adds install entries: cargo (pkg-group rust-toolchain), rustc, clippy, rustfmt, rust-lib-src; rust-analyzer (own group); libiconv (darwin systems), gcc (linux systems), clang (darwin systems). No removals.
Cargo workspace
/Cargo.toml
Introduces [workspace] with resolver = "2" and members = ["applications/datamanager"].

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws—new crates to bring,
A workspace hums, tools take wing.
Rusty friends aligned in rows,
GCC, Clang—for ports and OS rows.
In flox we nest our build so neat—
Hop, compile, repeat repeat! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately describes the primary changes in the changeset: adding a root Cargo.toml and introducing Flox resources (package declarations for the Rust toolchain and related tools). It is a concise, single-sentence summary that clearly communicates the main intent to a reviewer.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cargo-and-flox-updates

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 and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR sets up the necessary configuration files for a Rust workspace project. It adds a root Cargo.toml file to define the workspace structure and updates the Flox environment to include comprehensive Rust toolchain dependencies.

Key changes:

  • Added root Cargo.toml workspace configuration with resolver version 2
  • Enhanced Flox environment with complete Rust toolchain packages and platform-specific dependencies

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
Cargo.toml Adds workspace configuration defining datamanager application as a member
.flox/env/manifest.toml Adds comprehensive Rust toolchain dependencies with proper grouping and platform targeting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@forstmeier forstmeier added this to the Refactor milestone Sep 16, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Sep 16, 2025

Graphite Automations

"Assign author to pull request" took an action on this PR • (09/16/25)

1 assignee was added to this PR based on John Forstmeier's automation.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
Cargo.toml (1)

1-3: Optional: seed shared workspace metadata/deps now.

Add [workspace.package] (edition, rust-version) and a placeholder [workspace.dependencies] to centralize versions.

Apply:

 [workspace]
 resolver = "2"
 members = ["applications/datamanager"]
+
+[workspace.package]
+# version = "0.1.0"   # optional; members can opt-in via `workspace = true`
+# edition = "2021"    # or "2024" if you’ve adopted the new edition
+# rust-version = "1.7x" # set the MSRV you support
+
+[workspace.dependencies]
+# anyhow = "1"
+# thiserror = "1"
.flox/env/manifest.toml (2)

32-37: Consider adding clang on Linux for bindgen/cxx crates.

Many crates using bindgen/cxx require Clang/LibClang even on Linux. Keeping GCC is fine; adding Clang is additive.

Apply:

 clang.pkg-path = "clang"
-clang.systems = ["aarch64-darwin", "x86_64-darwin"]
+clang.systems = ["aarch64-darwin", "x86_64-darwin", "aarch64-linux", "x86_64-linux"]

32-33: Optional: unify groups for toggling toolchains.

If you plan to toggle all Rust bits together, consider using a single pkg-group = "rust-toolchain" for rust-analyzer too; otherwise current split is fine.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fddac8 and 905710d.

⛔ Files ignored due to path filters (2)
  • .flox/env/manifest.lock is excluded by !**/*.lock
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .flox/env/manifest.toml (1 hunks)
  • Cargo.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run Python tests
🔇 Additional comments (4)
Cargo.toml (1)

1-3: Workspace init looks good.

resolver = "2" is the right default and the member path structure is conventional.

.flox/env/manifest.toml (3)

30-31: Darwin‑only libiconv is appropriate.

Limiting libiconv to macOS targets avoids unnecessary Linux deps. LGTM.


34-35: Scoped GCC on Linux looks good.

Limiting GCC to Linux avoids toolchain conflicts on macOS. LGTM.


21-29: Resolved — Rust toolchain components are pinned and coherent.
Verified .flox/env/manifest.lock: rustc-wrapper-1.89.0, clippy-1.89.0, rustfmt-1.89.0, cargo-1.89.0 and rust-lib-src entries all reference the same nixpkgs rev (c23193b943c6c689d70ee98ce3128239ed9e32d1).

Comment thread .flox/env/manifest.toml
Comment thread Cargo.toml
@forstmeier forstmeier merged commit 9f6b542 into master Sep 16, 2025
3 checks passed
@forstmeier forstmeier deleted the cargo-and-flox-updates branch September 16, 2025 19:20
@coderabbitai coderabbitai Bot mentioned this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants