Skip to content

Conversation

ea935
Copy link

@ea935 ea935 commented Sep 15, 2025

Pull Request

Related issue

Fixes #705

What does this PR do?

  • Removes reqwest/rustls-tls as a required feature for the meilisearch/reqwest feature.
  • Adds the feature meilisearch/tls which enables reqwest/rustlts-tls

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Summary by CodeRabbit

  • New Features

    • Added a "tls" feature (alias to the Rustls TLS provider) and enabled it in the default feature set so HTTPS via Rustls is available by default.
  • Chores

    • Updated networking dependency features to retain HTTP/2 and streaming while moving TLS behind the new "tls" feature.

Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Cargo manifest changes remove rustls-tls from the reqwest feature list, add a public tls feature alias that enables reqwest/rustls-tls, and include tls in the crate default features alongside reqwest.

Changes

Cohort / File(s) Summary of changes
Cargo feature adjustments
Cargo.toml
- Removed rustls-tls from reqwest features (changed features from ["rustls-tls","http2","stream"] to ["http2","stream"]) with optional = true and default-features = false.
- Added public feature alias tls = ["reqwest/rustls-tls"].
- Updated defaults to default = ["reqwest","tls"].

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A twitch of whiskers, toggle of TLS—
I hop through crates with lighter steps.
Rustls waits as an optional bite,
Streams still hum and HTTP/2 takes flight. 🥕

Pre-merge checks and finishing touches

✅ 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 "Make reqwest/rustls-tls an optional feature" is concise and directly describes the primary change in the changeset (removing rustls-tls from the reqwest feature and making it separable), so a reviewer can quickly understand the main intent without extra detail.
Linked Issues Check ✅ Passed The PR removes "rustls-tls" from the reqwest feature and introduces a new public "tls" feature that aliases "reqwest/rustls-tls", which makes rustls no longer implied by enabling the "reqwest" feature so consumers can opt out, addressing the linked issue's goal of making TLS optional at the feature level. The Cargo.toml also adds "tls" to the default features alongside "reqwest", so the crate's default behavior still enables TLS unless defaults are disabled. Therefore the change implements the requested optionalization of rustls while preserving current default behaviour.
Out of Scope Changes Check ✅ Passed All modifications are limited to Cargo.toml feature and dependency declarations directly related to making rustls optional; no unrelated source files or logic changes are present in the provided summary. The only possibly debatable item (adding "tls" to defaults) is still within scope of feature management and not an out-of-scope change.
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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between faa177f and 74c38a4.

📒 Files selected for processing (1)
  • Cargo.toml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Cargo.toml

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

cursor[bot]

This comment was marked as outdated.

Copy link
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: 1

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

27-27: Gate http2 behind tls.

Remove reqwest's "http2" feature from the dependency and enable it only via the tls feature to avoid pulling h2 for non‑TLS builds. File: Cargo.toml (lines 27, 47)

-reqwest = { version = "0.12.22", optional = true, default-features = false, features = ["http2", "stream"] }
+reqwest = { version = "0.12.22", optional = true, default-features = false, features = ["stream"] }
-tls = ["reqwest/rustls-tls"]
+tls = ["reqwest/rustls-tls", "reqwest/http2"]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c029adb and faa177f.

📒 Files selected for processing (1)
  • Cargo.toml (2 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: Cursor Bugbot
🔇 Additional comments (1)
Cargo.toml (1)

47-47: New tls feature alias looks good — update docs/examples/tests & CI

  • Evidence: Cargo.toml contains tls = ["reqwest/rustls-tls"].
  • Action: Update README, docs, examples, and CI to recommend features = ["tls"] for HTTPS and explicitly state this uses rustls (not native-tls).
  • Action: Add a CI job that runs examples/tests both with and without tls.
  • Verification: automated HTTPS scan in the sandbox was inconclusive (ripgrep skipped files); run locally rg -n -uu --hidden 'https://' to find examples/tests that must be updated.

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.

Make the tls feature on the default reqwest client optional
1 participant