Skip to content

ci: 👷 Update Rust toolchain to nightly in format workflow#12

Merged
glenn-jocher merged 5 commits intomainfrom
ci/fmt-nightly
Nov 27, 2025
Merged

ci: 👷 Update Rust toolchain to nightly in format workflow#12
glenn-jocher merged 5 commits intomainfrom
ci/fmt-nightly

Conversation

@onuralpszr
Copy link
Member

@onuralpszr onuralpszr commented Nov 27, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Moves the Rust template to a nightly toolchain with enhanced formatting/linting setup and updated crate metadata for smoother development and publishing. 🚀


📊 Key Changes

  • 🔧 Switched GitHub Actions workflows from stable to nightly Rust toolchain for both formatting and publishing.
  • 🧩 Explicitly installs rustfmt in the format workflow, and rustfmt + clippy in the publish workflow.
  • 📦 Bumped crate version from 0.0.4 to 0.0.5.
  • 📚 Added a documentation URL (https://docs.ultralytics.com) to Cargo.toml.
  • 🛠️ Introduced a rust-toolchain.toml file to pin the project to nightly with common components (rustfmt, clippy, rust-src, rust-analyzer) and major targets.
  • ✨ Updated rustfmt.toml to enable unstable_features, allowing use of nightly-only rustfmt options.

🎯 Purpose & Impact

  • ✅ Ensures consistent, reproducible tooling across local development and CI by standardizing on the nightly toolchain.
  • 🧹 Improves code quality and style enforcement with stricter formatting and linting in CI (via rustfmt and clippy).
  • 🔄 Makes it easier for contributors to get a fully configured Rust environment (analyzers, sources, and targets) with no extra setup.
  • 📖 Provides a clear link to Ultralytics documentation from the crate, improving discoverability for users.
  • 📦 Version bump signals a tooling/config update, helping downstream users track changes and upgrades.

Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
@UltralyticsAssistant UltralyticsAssistant added the enhancement New feature or request label Nov 27, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @onuralpszr, thank you for submitting a ultralytics/template-rust 🚀 PR! This is an automated review assistant, and a Ultralytics engineer will be with you shortly. In the meantime, to ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/template-rust main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

Copy link
Member

@UltralyticsAssistant UltralyticsAssistant left a comment

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

CI now installs nightly rustfmt, but without pinning a date the workflow may fail whenever nightly formatting changes. Please lock the nightly toolchain version (or otherwise constrain it) to keep format checks deterministic.

💬 Posted 1 inline comment

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit d6de697 into main Nov 27, 2025
5 checks passed
@glenn-jocher glenn-jocher deleted the ci/fmt-nightly branch November 27, 2025 11:35
@UltralyticsAssistant
Copy link
Member

🚀 PR merged and it’s a big win for the Rust ecosystem around Ultralytics — amazing work, @onuralpszr, and thanks to @glenn-jocher for the collaboration on this one!

“Great things are done by a series of small things brought together.” – Vincent van Gogh

This PR is a perfect example of that: moving the template to a nightly toolchain, tightening up rustfmt/clippy integration, pinning rust-toolchain.toml, and polishing crate metadata all combine to create a smoother, more reliable development and publishing experience for everyone.

Standardizing on nightly, reinforcing CI checks, and wiring in documentation and versioning all help future contributors get productive faster and ship higher-quality Rust projects with confidence.

Thank you for investing this level of care into the template—your work will quietly power a lot of future projects. 💡

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants