Skip to content

Conversation

CoveMB
Copy link
Contributor

@CoveMB CoveMB commented Sep 25, 2025

Fixes #676

Add recommended profile release and profile release-with-log as per documentation

@CoveMB CoveMB requested review from a team as code owners September 25, 2025 19:37
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Introduces release profiles in the shared workspace Cargo configuration and refactors zip-rust to import workspaceCargo from zip-shared instead of defining it locally. Removes unused imports in zip-rust.

Changes

Cohort / File(s) Summary
Shared workspace Cargo profiles
packages/core/stellar/src/zip-shared.ts
Adds [profile.release] and [profile.release-with-logs] to workspace Cargo output; no API surface changes.
Import refactor to shared workspaceCargo
packages/core/stellar/src/zip-rust.ts
Removes local workspaceCargo constant and unused imports; imports workspaceCargo from './zip-shared'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tirumerla
  • MCarlomagno

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the addition of a release profile to the Stellar Rust environment download, which matches the main change introduced in the pull request. It clearly highlights the key feature without extraneous details.
Linked Issues Check ✅ Passed The pull request implements the recommended [profile.release] settings from issue #676 and also adds a [profile.release-with-logs], integrating both into the shared configuration and the Rust download logic. This fully addresses the objective of including the optimized release profile in the workspace Cargo.toml.
Out of Scope Changes Check ✅ Passed All modifications are focused on adding the Cargo profiles and updating imports to use the shared configuration, which are directly related to the linked issue objectives. There are no unrelated or extraneous changes in this pull request.
Description Check ✅ Passed The description directly references fixing issue #676 and adding the recommended release and release-with-log profiles as per the documentation, which aligns with the actual code changes. It remains on-topic and clearly conveys the purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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
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: 0

🧹 Nitpick comments (1)
packages/core/stellar/src/zip-shared.ts (1)

92-106: Optional: add a TOML comment linking the source of truth.

A brief inline comment aids users discovering why these settings exist.

 [workspace.dependencies]
 ${addDependenciesWith(`"${compatibleSorobanVersion}"`, ['soroban-sdk'])}${addDependenciesWith(`"=${contractsVersion}"`, [...libDependencies])}

+[#] Profiles recommended by Stellar docs:
+[#] https://developers.stellar.org/docs/build/smart-contracts/getting-started/hello-world#release-profile
 [profile.release]
 opt-level = "z"
 overflow-checks = true
 debug = 0
 strip = "symbols"
 debug-assertions = false
 panic = "abort"
 codegen-units = 1
 lto = true
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a90806 and b2f28ce.

📒 Files selected for processing (2)
  • packages/core/stellar/src/zip-rust.ts (1 hunks)
  • packages/core/stellar/src/zip-shared.ts (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). (3)
  • GitHub Check: build (solidity, default)
  • GitHub Check: build (stellar, compile)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (3)
packages/core/stellar/src/zip-shared.ts (2)

103-106: Verify the profile name: “release-with-logs” vs “release-with-log”.

PR text mentions “release-with-log” (singular); here it’s “release-with-logs” (plural). Consistency matters for build commands (cargo build --profile …).

If the docs/use expect singular, apply:

-[profile.release-with-logs]
+[profile.release-with-log]
 inherits = "release"
 debug-assertions = true

Also align any references in docs/scripts accordingly.


93-101: Profile.release settings match Stellar’s recommended configuration Settings align exactly with the current docs (opt-level="z", overflow-checks=true, debug=0, strip="symbols", debug-assertions=false, panic="abort", codegen-units=1, lto=true); no changes needed.

packages/core/stellar/src/zip-rust.ts (1)

10-11: Approve reuse of shared workspaceCargo; no stale definitions found
No local definitions or unintended usages detected outside zip-shared.ts.

@CoveMB CoveMB merged commit 450ab48 into OpenZeppelin:master Sep 26, 2025
18 of 19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stellar: Rust Development Package missing profile configuration
4 participants