removed#460
removed#460MrCyjaneK wants to merge 27 commits intoeigenwallet:masterfrom MrCyjaneK:cyjan-contrib-depends
Conversation
WalkthroughThis set of changes updates build scripts, configuration files, dependencies, documentation, and submodules across the project. Key modifications include improved cross-platform build handling for Monero (notably for Windows and Apple targets), expanded and clarified documentation, refined formatting and submodule exclusions, updates to Tauri and related dependencies, enhanced error handling, and platform-specific configuration adjustments for desktop and mobile environments. Changes
Sequence Diagram(s)sequenceDiagram
participant BuildScript as build.rs
participant Depends as contrib/depends
participant CMake as CMake
participant Patch as Embedded Patch
participant Make as make
participant Output as Build Output
BuildScript->>Patch: Apply embedded patches (skip if already applied)
BuildScript->>Depends: Copy depends if not present
BuildScript->>Make: Run make with normalized target
Make-->>BuildScript: Stream stdout/stderr in real time
BuildScript->>CMake: Configure with toolchain and paths
CMake->>Output: Build native libraries
BuildScript->>Output: Add link/search paths, set env vars
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (11)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (7)
🧰 Additional context used📓 Path-based instructions (1)monero-sys/**/build.rs📄 CodeRabbit Inference Engine (monero-sys/CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learningsrust-toolchain.toml (4)Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR monero-sys/build.rs (16)Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR ⏰ 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)
🔇 Additional comments (10)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Cool! I'll try it out in a minute. |
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (3)
monero-sys/build.rs (3)
51-51: Fix typo in comment"Eerun" should be "Rerun".
- // Eerun this when the bridge.rs or static_bridge.h file changes. + // Rerun this when the bridge.rs or static_bridge.h file changes.
201-201: Remove or conditionalize hardcoded library pathThe hardcoded path
/usr/lib/x86_64-linux-gnuis not portable and will cause issues on non-x86_64 or non-Linux systems.Consider either:
- Making this conditional based on the target:
- println!("cargo:rustc-link-search=native=/usr/lib/x86_64-linux-gnu"); + #[cfg(all(target_os = "linux", target_arch = "x86_64"))] + println!("cargo:rustc-link-search=native=/usr/lib/x86_64-linux-gnu");
- Or removing it if the contrib/depends system provides all necessary libraries.
268-271: Fix println! macro syntaxRemove the spaces between
printlnand!to fix the syntax error.- println !("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/lib/darwin"); - println !("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/16.0.0/lib/darwin"); - println !("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/17.0.0/lib/darwin"); - println !("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/18.0.0/lib/darwin"); + println!("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/lib/darwin"); + println!("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/16.0.0/lib/darwin"); + println!("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/17.0.0/lib/darwin"); + println!("cargo:rustc-link-search=native=/Library/Developer/CommandLineTools/usr/lib/clang/18.0.0/lib/darwin");
🧹 Nitpick comments (3)
swap/Cargo.toml (1)
110-110: Consider a more specific version constraint for stability.The migration from
vergentovergen-git2looks good and aligns with the API changes inbuild.rs. However, the version constraint "1" is quite broad and might allow breaking changes in patch versions.Consider using a more specific version constraint like "1.0" or "1.0.0" for better build reproducibility.
-vergen-git2 = { version = "1", features = ["build"] } +vergen-git2 = { version = "1.0", features = ["build"] }monero-sys/monero_c (1)
1-1: Pin submodule to a stable, tagged Monero-C revision for reproducible buildsThe pointer currently references an arbitrary commit on
develop. Relying on an untagged commit can silently pull in breaking changes when the submodule is updated in the future. Consider updating.gitmodulesto follow a release tag (or vendor the exact commit with a locked SHA in CI) to guarantee deterministic builds across environments.monero-sys/build.rs (1)
109-109: Remove trailing whitespace from empty linesEmpty lines should not contain whitespace characters.
Also applies to: 132-132
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
.cargo/config.toml(1 hunks).gitmodules(1 hunks)monero-sys/build.rs(5 hunks)monero-sys/monero(1 hunks)monero-sys/monero_c(1 hunks)monero-sys/patches/0001-fix-dummy-translation-generator.patch(1 hunks)monero-sys/patches/0002-fix-iOS-depends-build.patch(1 hunks)monero-sys/patches/0003-include-locale-only-when-targeting-WIN32.patch(1 hunks)swap/Cargo.toml(1 hunks)swap/build.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
monero-sys/**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
monero-sys/**/build.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: AGENT.md:0-0
Timestamp: 2025-06-30T08:53:49.176Z
Learning: Pull request titles must use the format `<type>(<scope>): <description>`, for example: `feat(gui): New feature`, `fix(swap): Issue fixed`, or `refactor(ci): Ci changes`.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
monero-sys/monero_c (10)
undefined
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use unsafe only for FFI interactions with Monero C++ code.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use Pin for C++ objects that require stable memory addresses in src/lib.rs.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the cxx::bridge macro, declaring C++ types and functions to be accessed from Rust.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Raw pointers must never be exposed to users of the library in src/lib.rs.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
</retrieved_learning>
swap/Cargo.toml (1)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
monero-sys/monero (10)
undefined
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use unsafe only for FFI interactions with Monero C++ code.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the cxx::bridge macro, declaring C++ types and functions to be accessed from Rust.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : Raw pointers must be wrapped in safe Rust types, and unsafe is only used at the FFI boundary.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use Pin for C++ objects that require stable memory addresses in src/lib.rs.
</retrieved_learning>
monero-sys/patches/0003-include-locale-only-when-targeting-WIN32.patch (10)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use `Pin` for C++ objects that require stable memory addresses in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use the `OnceLock` pattern to ensure WalletManager is a singleton in src/lib.rs.
.cargo/config.toml (2)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
swap/build.rs (2)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
monero-sys/patches/0002-fix-iOS-depends-build.patch (9)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use `Pin` for C++ objects that require stable memory addresses in src/lib.rs.
monero-sys/patches/0001-fix-dummy-translation-generator.patch (4)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
monero-sys/build.rs (15)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : Raw pointers must be wrapped in safe Rust types, and `unsafe` is only used at the FFI boundary.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use `Pin` for C++ objects that require stable memory addresses in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the `unsafe extern "C++"` block in bridge.rs, 3. Create a Rust wrapper in lib.rs, 4. For functions with CXX limitations, add helpers in bridge.h.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use the `OnceLock` pattern to ensure WalletManager is a singleton in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Raw pointers must never be exposed to users of the library in src/lib.rs.
.gitmodules (7)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
🔇 Additional comments (18)
swap/build.rs (2)
2-2: Clean API migration from vergen to vergen-git2.The import statement correctly reflects the new API structure with separate builder and emitter components.
5-9: Proper implementation of the new vergen-git2 API.The migration from
EmitBuilder::builder().git_describe(true, true, None).emit()to the new builder-emitter pattern is implemented correctly:
Git2Builder::all_git()provides comprehensive git metadata collection- The emitter pattern with
add_instructions()andemit()is idiomatic- Error handling with
?operator is appropriate throughoutThe functionality should be equivalent to the previous implementation while following the new API design.
.gitmodules (1)
5-8: Clarify the purpose of having two submodules pointing to the same repository.The configuration now has two submodules (
monero-sys/moneroandmonero-sys/monero_c) pointing to the same repository but different branches. This is unusual and may cause confusion. Consider documenting the purpose of each submodule or consolidating them if they serve the same purpose.monero-sys/patches/0003-include-locale-only-when-targeting-WIN32.patch (2)
15-20: LGTM! Clean platform-specific dependency optimization.The CMake logic correctly conditionally includes the boost locale component only for WIN32 targets, which reduces unnecessary dependencies on other platforms.
32-34: LGTM! Consistent conditional include for boost locale.The C preprocessor directive correctly mirrors the CMake logic by only including boost/locale.hpp on WIN32 platforms, maintaining consistency between build configuration and source code.
.cargo/config.toml (2)
7-8: LGTM! Proper MSVC linker flag for stack size.The MSVC-specific linker flag
/STACK:8388608correctly sets the stack size to 8MB, which addresses the smaller default stack sizes on Windows.
10-18: LGTM! Comprehensive GNU toolchain configuration.The GNU/MinGW configuration properly uses the GCC-style linker flag
-Wl,--stack,8388608and includes necessary Windows system libraries. The additional libraries (advapi32, rpcrt4, ole32, winhttp, crypt32) are standard Windows system libraries commonly required for cross-compilation.monero-sys/patches/0002-fix-iOS-depends-build.patch (3)
21-23: LGTM! Removes unconditional iOS-specific CMake inclusion.Removing the unconditional inclusion of
CmakeLists_IOS.txtis appropriate since iOS-specific handling should be conditional rather than always included.
37-41: LGTM! Proper iOS framework linking distinction.The conditional framework linking correctly differentiates iOS from other Apple platforms. iOS only needs Foundation and IOKit frameworks, while other Apple platforms require additional frameworks like ApplicationServices and AppKit.
71-74: LGTM! Correct iOS exclusion from desktop-specific code.The conditional compilation correctly excludes iOS from Apple-specific headers and functionality that are only available on desktop platforms. Using
!defined(TARGET_OS_IPHONE)is the proper way to exclude iOS while including other Apple platforms.monero-sys/patches/0001-fix-dummy-translation-generator.patch (2)
28-53: LGTM! Clean dummy translation header generation.The direct file generation approach eliminates external tool dependencies while providing a proper interface. The generated header includes:
- Proper header guards
- Correct embedded_file structure with NULL terminator
- Function signature that maintains expected interface
- Always returns false for find_embedded_file, which is appropriate for a dummy implementation
65-67: LGTM! Proper cleanup of external project dependency.The removal of the
generate_translations_headerdependency from the common library is correct since the header is now generated directly during CMake configuration rather than as an external project.monero-sys/build.rs (6)
64-108: Good implementation of contrib/depends build systemThe integration of contrib/depends with proper target normalization and error handling is well implemented. The explicit list of supported targets provides clear validation.
Consider moving the target normalization after the match statement to avoid potential confusion if an unsupported target gets normalized but still fails.
114-131: Excellent refactoring to use toolchain filesThe replacement of hardcoded paths with dynamic toolchain files from contrib/depends significantly improves portability and maintainability. The implementation correctly constructs paths and adds necessary link search directories.
158-158: Verify CMAKE_CROSSCOMPILING settingSetting
CMAKE_CROSSCOMPILINGto "OFF" seems incorrect when building for different targets. This could affect CMake's cross-compilation behavior.Please verify if this is intentional or if it should be set dynamically based on whether the host and target platforms differ.
318-323: Clarify removal of static library linksThe static linking for
nghttp2,event, andprotobufhas been commented out without explanation.Please add a comment explaining why these libraries are no longer linked directly. Are they now provided by contrib/depends or no longer needed?
24-45: Well-structured patch managementThe expansion of the patches array with clear naming and descriptions is excellent. Each patch addresses specific build issues across different platforms, and the compile-time embedding ensures patches are always available.
344-345: Consistent integration of contrib/depends in CXX bridgeThe updated include paths properly integrate the contrib/depends system, replacing hardcoded paths with dynamic ones based on the target. This maintains consistency with the CMake configuration.
|
bugbot run |
|
Ignore those AI reviews for now. Mostly BS to be totally frank with you. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
monero-sys/build.rs (2)
64-66: Fix.expect()message format to follow coding guidelines.The expect message should be a short description of the assumed invariant in the specified format.
- let contrib_depends_dir = std::env::current_dir() - .expect("Failed to get current directory") - .join("monero_c/contrib/depends"); + let contrib_depends_dir = std::env::current_dir() + .expect("current directory to be accessible") + .join("monero_c/contrib/depends");
68-78: Consider using a more robust target normalization approach.The current target normalization uses individual if statements which could become unwieldy as more targets are added. Consider using a match statement or a mapping table for better maintainability.
- let mut target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_string()); - if target == "aarch64-unknown-linux-gnu" { - target = "aarch64-linux-gnu".to_string(); - } - if target == "armv7-linux-androideabi" { - target = "armv7a-linux-androideabi".to_string(); - } - if target == "x86_64-pc-windows-gnu" { - target = "x86_64-w64-mingw32".to_string(); - } + let target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_string()); + let target = match target.as_str() { + "aarch64-unknown-linux-gnu" => "aarch64-linux-gnu", + "armv7-linux-androideabi" => "armv7a-linux-androideabi", + "x86_64-pc-windows-gnu" => "x86_64-w64-mingw32", + _ => &target, + }.to_string();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
.cargo/config.toml(1 hunks).gitmodules(1 hunks)monero-sys/build.rs(5 hunks)monero-sys/monero(1 hunks)monero-sys/monero_c(1 hunks)monero-sys/patches/0001-fix-dummy-translation-generator.patch(1 hunks)monero-sys/patches/0002-fix-iOS-depends-build.patch(1 hunks)monero-sys/patches/0003-include-locale-only-when-targeting-WIN32.patch(1 hunks)swap/Cargo.toml(1 hunks)swap/build.rs(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .gitmodules
🚧 Files skipped from review as they are similar to previous changes (8)
- monero-sys/monero
- .cargo/config.toml
- monero-sys/patches/0002-fix-iOS-depends-build.patch
- swap/build.rs
- monero-sys/monero_c
- monero-sys/patches/0001-fix-dummy-translation-generator.patch
- swap/Cargo.toml
- monero-sys/patches/0003-include-locale-only-when-targeting-WIN32.patch
🧰 Additional context used
📓 Path-based instructions (2)
monero-sys/**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
monero-sys/**/build.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
monero-sys/build.rs (15)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : Raw pointers must be wrapped in safe Rust types, and `unsafe` is only used at the FFI boundary.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use `Pin` for C++ objects that require stable memory addresses in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the `unsafe extern "C++"` block in bridge.rs, 3. Create a Rust wrapper in lib.rs, 4. For functions with CXX limitations, add helpers in bridge.h.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use the `OnceLock` pattern to ensure WalletManager is a singleton in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Raw pointers must never be exposed to users of the library in src/lib.rs.
🔇 Additional comments (5)
monero-sys/build.rs (5)
24-45: LGTM! Embedded patches expansion is well-structured.The expansion from a single patch to four patches is properly implemented with clear naming and descriptions. The
embedded_patch!macro usage is consistent and the patch file paths appear correct.
80-107: Target validation and make execution implementation is solid.The match statement properly validates supported targets and the make command execution includes comprehensive error handling with detailed output capture. The panic on unsupported targets is appropriate for a build script.
114-130: CMake toolchain configuration is well-implemented.The target-aware toolchain file configuration and native link search path setup correctly leverages the contrib/depends system. The panic for unconfigured targets maintains consistency with the earlier validation.
344-345: Include path updates properly leverage contrib/depends.The replacement of hardcoded Homebrew paths with contrib/depends paths is a good improvement that makes the build more portable and consistent across platforms.
318-322: Verify nghttp2, libevent, and protobuf linkage in the CMake buildWe don’t have a contrib/depends folder, so those commented‐out println!("cargo:rustc-link-lib=static=…") lines (build.rs:318-322) are the only remaining link directives for nghttp2, libevent, and protobuf. Ensure your CMakeLists.txt (or the toolchain file under contrib_depends_dir if set) is actually finding and linking these libraries into the wallet_api (or whatever target consumes them). Otherwise you’ll need to re-enable those cargo:rustc-link-lib lines or add appropriate –D flags to the CMake invocation.
• Location: monero-sys/build.rs, lines 318–322
• Action: Confirm CMake’s find_package()/link_libraries() calls for nghttp2, libevent, and protobuf—or restore the Rust link directives.
|
I'll just start collecting some of my thoughts here. @Einliterflasche will look over this tomorrow as well.
|
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
monero-sys/build.rs (1)
155-166: Configuration looks correct with intentional CMAKE_CROSSCOMPILING setting.The CMake configuration properly integrates with the contrib/depends system. The hardcoded
CMAKE_CROSSCOMPILING="OFF"is intentional per previous maintainer feedback.
🧹 Nitpick comments (2)
monero-sys/build.rs (2)
268-274: Consider making clang runtime library versions more flexible.The hardcoded clang version paths may become outdated as new Xcode versions are released.
Consider using a more flexible approach to detect available clang versions:
// Add search paths for clang runtime libraries on macOS (not iOS) if target.contains("apple-darwin") { // Add common clang runtime library paths let clang_lib_base = "/Library/Developer/CommandLineTools/usr/lib/clang"; if let Ok(entries) = std::fs::read_dir(clang_lib_base) { for entry in entries.flatten() { let lib_path = entry.path().join("lib/darwin"); if lib_path.exists() { println!("cargo:rustc-link-search=native={}", lib_path.display()); } } } }
320-325: Document why libraries are commented out.The commented out library links (
nghttp2,event,protobuf) suggest these dependencies are no longer needed or causing issues, but this should be documented.- // println!("cargo:rustc-link-lib=static=nghttp2"); - // println!("cargo:rustc-link-lib=static=event"); + // Note: nghttp2 and event libraries are now provided by contrib/depends + // println!("cargo:rustc-link-lib=static=nghttp2"); + // println!("cargo:rustc-link-lib=static=event"); // Link protobuf statically - // println!("cargo:rustc-link-lib=static=protobuf"); + // Note: protobuf library is now provided by contrib/depends + // println!("cargo:rustc-link-lib=static=protobuf");
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
monero-sys/build.rs(7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
monero-sys/**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
monero-sys/**/build.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: MrCyjaneK
PR: UnstoppableSwap/core#460
File: monero-sys/build.rs:155-166
Timestamp: 2025-07-15T16:53:31.429Z
Learning: In monero-sys/build.rs, the CMAKE_CROSSCOMPILING flag is intentionally hardcoded to "OFF" even for cross-compilation scenarios. This is a deliberate design choice by the maintainers and should not be changed to dynamically detect cross-compilation.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types in src/lib.rs.
monero-sys/build.rs (15)
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX, and link required libraries.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use Rust 2021 edition.
Learnt from: MrCyjaneK
PR: UnstoppableSwap/core#460
File: monero-sys/build.rs:155-166
Timestamp: 2025-07-15T16:53:31.429Z
Learning: In monero-sys/build.rs, the CMAKE_CROSSCOMPILING flag is intentionally hardcoded to "OFF" even for cross-compilation scenarios. This is a deliberate design choice by the maintainers and should not be changed to dynamically detect cross-compilation.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, define the FFI interface using the `cxx::bridge` macro, declaring C++ types and functions to be accessed from Rust.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : When adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, then add wrapping logic in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, mirror functions from monero/src/wallet/api/wallet2_api.h by copying their definitions and letting CXX generate the bindings.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, using wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/{src/bridge.rs,src/lib.rs} : Raw pointers must be wrapped in safe Rust types, and `unsafe` is only used at the FFI boundary.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Use `Pin` for C++ objects that require stable memory addresses in src/lib.rs.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Always verify method signatures in the Monero C++ headers before adding them to the Rust bridge.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/**/*.rs : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the `unsafe extern "C++"` block in bridge.rs, 3. Create a Rust wrapper in lib.rs, 4. For functions with CXX limitations, add helpers in bridge.h.
Learnt from: CR
PR: UnstoppableSwap/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-06-30T08:53:46.750Z
Learning: Applies to monero-sys/src/lib.rs : Raw pointers must never be exposed to users of the library in src/lib.rs.
🔇 Additional comments (4)
monero-sys/build.rs (4)
24-45: LGTM! Enhanced embedded patches configuration.The expansion from a single patch to multiple patches follows the established pattern correctly and improves the build system's flexibility.
114-131: LGTM! Robust toolchain file configuration.The toolchain file configuration correctly integrates with the contrib/depends system and provides proper error handling for unsupported targets.
329-334: LGTM! Proper iOS deployment target configuration.The iOS-specific configuration correctly sets the minimum deployment target to address the
___chkstk_darwinlinker issue mentioned in the PR objectives.
342-343: LGTM! Updated include paths for contrib/depends integration.The include paths correctly reference the contrib/depends directory structure, replacing the previous hardcoded paths.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
monero-sys/build.rs (3)
52-89: Fix .expect() message format to follow coding guidelines.The helper function logic is sound, but the
.expect()messages need to follow the project's format guidelines.- let stdout = child.stdout.take().expect("Failed to get stdout"); - let stderr = child.stderr.take().expect("Failed to get stderr"); + let stdout = child.stdout.take().expect("stdout to be available"); + let stderr = child.stderr.take().expect("stderr to be available");
122-157: Good target validation and make execution, but fix .expect() message format.The target validation logic is comprehensive and the make command execution with piped output is well-implemented. However, one
.expect()message needs formatting adjustment:- let status = execute_child_with_pipe(child).expect("Failed to execute make command"); + let status = execute_child_with_pipe(child).expect("make command execution to succeed");
250-252: Good improvement but consider further refinement.The conditional Linux library path is better than the previous hardcoded approach, but this still targets only x86_64 architecture. Consider if this system path is still needed with the contrib/depends system providing dependencies.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (33)
src-tauri/gen/apple/.gitignoreis excluded by!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.pngis excluded by!**/*.png,!**/gen/**src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/Contents.jsonis excluded by!**/gen/**src-tauri/gen/apple/Assets.xcassets/Contents.jsonis excluded by!**/gen/**src-tauri/gen/apple/ExportOptions.plistis excluded by!**/gen/**src-tauri/gen/apple/LaunchScreen.storyboardis excluded by!**/gen/**src-tauri/gen/apple/Podfileis excluded by!**/gen/**src-tauri/gen/apple/Sources/unstoppableswap-gui-rs/bindings/bindings.his excluded by!**/gen/**src-tauri/gen/apple/Sources/unstoppableswap-gui-rs/main.mmis excluded by!**/gen/**src-tauri/gen/apple/project.ymlis excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs.xcodeproj/project.pbxprojis excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs.xcodeproj/project.xcworkspace/contents.xcworkspacedatais excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsis excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs.xcodeproj/xcshareddata/xcschemes/unstoppableswap-gui-rs_iOS.xcschemeis excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs_iOS/Info.plistis excluded by!**/gen/**src-tauri/gen/apple/unstoppableswap-gui-rs_iOS/unstoppableswap-gui-rs_iOS.entitlementsis excluded by!**/gen/**
📒 Files selected for processing (1)
monero-sys/build.rs(8 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
monero-sys/**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
monero-sys/**/build.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
🔇 Additional comments (8)
monero-sys/build.rs (8)
24-50: LGTM! Well-structured embedded patches configuration.The expansion to five embedded patches is well-organized with clear descriptions and proper use of the macro. The patch structure provides good traceability and maintainability.
108-121: Excellent improvements to target normalization and directory handling.The use of a match statement for target normalization is much cleaner than the previous if-statement chain, and the
.expect()message now follows the coding guidelines correctly. The addition of the iOS simulator target mapping is also appropriate.
162-174: LGTM! Dynamic toolchain file and library path configuration.The CMake configuration properly uses dynamic paths based on the contrib/depends system and target architecture. This is a significant improvement over hardcoded paths.
197-207: LGTM! Proper sodium library configuration.The sodium library and include path configuration is correctly set up to use the contrib/depends system with target-specific paths.
317-322: LGTM! Appropriate clang runtime library paths for macOS.The search paths for different clang versions ensure compatibility across various macOS development environments, and the exclusion of iOS targets is correct.
358-362: LGTM! Appropriate conditional static linking for Windows.The conditional static linking of boost_locale, boost_program_options, and iconv for Windows mingw-w64 targets is properly implemented and follows the cross-platform build requirements.
383-388: LGTM! Proper iOS target configuration.The iOS minimum deployment target configuration and the addition of required linker flags are correctly implemented to resolve the ___chkstk_darwin symbol issues mentioned in the PR objectives.
396-402: LGTM! Dynamic include paths for C++ bridge.The replacement of hardcoded Homebrew paths with dynamic contrib/depends paths improves cross-platform compatibility and follows the new build system architecture.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
monero-sys/build.rs(9 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
monero-sys/**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
monero-sys/**/build.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- monero-sys/CLAUDE.md
🔇 Additional comments (11)
monero-sys/build.rs (11)
24-50: LGTM: Embedded patches expansion is well-structured.The expansion from one to five embedded patches is well-organized and follows a consistent pattern. The macro usage and patch descriptions are clear and descriptive.
108-120: Target normalization logic has been improved.The refactoring from multiple if statements to a match statement improves readability and maintainability. The addition of the iOS simulator target mapping is also appropriate.
122-157: Build process validation and execution is well-implemented.The target validation against a whitelist is a good security practice, and the make execution with proper error handling and output streaming is well-implemented.
162-207: CMake configuration is properly updated for contrib/depends system.The toolchain file configuration and sodium library setup are appropriate for the new build system. The CMAKE_CROSSCOMPILING setting is intentionally hardcoded to "OFF" based on past maintainer feedback.
250-252: Linux library path handling is correctly targeted.The condition now properly checks for both "linux" and "x86_64" to avoid incorrect path usage on non-x86_64 Linux targets like aarch64-linux-gnu.
317-322: macOS library path configuration is appropriate.The search paths for clang runtime libraries are correctly limited to macOS (excluding iOS) and cover multiple clang versions for compatibility.
358-362: Windows-specific library linking is properly conditional.The conditional linking of boost_locale, boost_program_options, and iconv libraries for Windows mingw-w64 targets is appropriate and follows the platform-specific requirements.
374-378: Library linking cleanup is appropriate.The commenting out of nghttp2, event, and protobuf static linking commands aligns with the transition to the contrib/depends system which handles these dependencies.
383-388: iOS configuration is properly implemented.The iOS-specific deployment target and environment variable settings are correctly configured to resolve linker issues mentioned in the PR objectives.
396-402: Include directory updates are well-structured.The dynamic include path construction using contrib_depends_dir and target is appropriate for the new build system, replacing the hardcoded Homebrew paths.
500-507: Patch application logic improvement is robust.The new logic to check if a patch is already applied by attempting to reverse it is a good approach to prevent duplicate patch applications. This makes the build process more idempotent.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
dprint.json (1)
27-29: Normalize directory patterns with a trailing/**
dprinttreats directory paths without a wildcard as single files.
For directories you usually want"dir/**"to exclude everything inside.
Consider adjusting the two new entries accordingly:- "monero-seed/**", - "monero-sys/monero_c", - "monero-sys/monero/" + "monero-seed/**", + "monero-sys/monero_c/**", + "monero-sys/monero/**"This keeps the style consistent with the existing
"monero-sys/monero/"rule and avoids accidental formatting of nested files.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
dprint.json(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: Cursor BugBot
🔇 Additional comments (1)
dprint.json (1)
23-23: Remove the duplicatemonero-sys/monero*exclude entry
"monero-sys/monero/"(line 23) and"monero-sys/monero"(line 29) exclude exactly the same path, so one of them is redundant and clutters the list.- "monero-sys/monero",[ suggest_nitpick ]
Also applies to: 29-29
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
monero-sys/CLAUDE.md (3)
47-52: Refine wording & highlight manual-audit requirementCurrent phrasing is wordy and mixes ownership guidance with the
TransactionHistorycaveat. Tightening the language improves readability and makes the audit requirement explicit.- - if we know we are the owner of the value we use `std::unique_ptr<T>` - - if we don't know we use `std::shared_ptr<T>` - - in the case of `TransactionHistory` we use a raw pointer because we aren't the only owner of the value but also need to mutate it. - Such uses have to be manually verified! + - If the bridge **owns** the value, use `std::unique_ptr<T>`. + - If ownership is shared or uncertain, use `std::shared_ptr<T>`. + - `TransactionHistory` is returned as a raw pointer because multiple components mutate it. + **Each such case must be manually audited.**
70-72: Promote code-block example & clarifyunsafecommentaryEmbedding a full
impl Derefinside parentheses makes the guideline hard to read. Presenting it as a fenced code block and tightening the wording onunsafeimproves clarity.- - Each use of `unsafe` must have a `// Safety: ...` comment explaining why every required invariant is upheld. - - Proper deref implementations for wrapper types (`impl Deref for RawWallet { type Target = ffi::Wallet; fn deref(&self) -> &Self::Target { unsafe { self.inner.as_ref().expect("RawWallet is not null") } } }`) + - Every `unsafe` block **must** include a `// Safety:` comment that states which invariants are upheld. + - Example of a correct `Deref` implementation for a wrapper type: + + ```rust + impl Deref for RawWallet { + type Target = ffi::Wallet; + + fn deref(&self) -> &Self::Target { + // Safety: `inner` is guaranteed non-null for all live `RawWallet`s. + unsafe { self.inner.as_ref().expect("RawWallet is not null") } + } + } + ```
82-90: Fix list indentation & spelling; simplify guidanceMarkdown linting flags incorrect indentation, and there are two spelling errors (“limitaions”, “conaints”). The patch below cleans both and streamlines the bullet hierarchy.
-*`Send and Sync`*: - - Don't `unsafe impl Sync`, it's never needed. Work around limitaions if necessary. - - You can `unsafe impl Send` for a Rust wrapper type *if* you verified that the type is safe to be moved around threads: - - By default, assume that *no type is `Send`* - - A type is *not `Send`* if it contains a reference/pointer to a non-`Send` type -- notably, `Wallet` and `WalletManager` are not `Send` - - A type is *not `Send`* if it uses thread local storage (`WalletManager` and `Wallet`) - - A type *is `Send`* if it contains only basic types: integers, strings, vectors of other basic types or other `Send` types. - - Never implement `Send` unless you have specifically verified that the type actually is. - - Even if it would be possible, try to avoid implementing `Send` if possible. For example, instead of implementing `unsafe impl Send for TransactionInfoHandle` we immediately copy the values it conaints into our own, Rust-native `TransactionInfo` struct. +*`Send` and `Sync`*: + - Avoid `unsafe impl Sync`; it is almost never required. Work around limitations instead. + - You may `unsafe impl Send` **only after** verifying thread-safety: + - By default, assume **no** type is `Send`. + - A type is **not** `Send` if it contains a pointer to a non-`Send` value (e.g. `Wallet`, `WalletManager`). + - A type is **not** `Send` if it relies on thread-local storage (`WalletManager`, `Wallet`). + - A type *is* `Send` if it contains only primitives, `String`, `Vec` of primitives, or other `Send` types. + - Never implement `Send` unless you have validated all of the above. + - Prefer alternatives: instead of `unsafe impl Send for TransactionInfoHandle`, copy the data into a Rust-native `TransactionInfo` struct.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
justfile(2 hunks)monero-sys/CLAUDE.md(2 hunks)
🧰 Additional context used
🪛 LanguageTool
monero-sys/CLAUDE.md
[style] ~48-~48: You can shorten this phrase to avoid wordiness.
Context: ...them in a pointer: - if we know we are the owner of the value we use std::unique_ptr<T> ...
(BE_THE_MAKER_OF_WORDINESS)
[grammar] ~83-~83: Ensure spelling is correct
Context: ...l Sync, it's never needed. Work around limitaions if necessary. - You can unsafe imp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~90-~90: Ensure spelling is correct
Context: ...ndlewe immediately copy the values it conaints into our own, Rust-nativeTransactionI...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.17.2)
monero-sys/CLAUDE.md
82-82: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
83-83: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
84-84: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
85-85: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
86-86: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
87-87: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
88-88: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
89-89: Unordered list indentation
Expected: 4; Actual: 6
(MD007, ul-indent)
90-90: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
🔇 Additional comments (2)
justfile (2)
10-14: LGTM! Well-structured cleanup process.The recipe renaming and expanded functionality effectively supports the new build system:
- Generic name better reflects the broader cleanup scope
cargo cleanensures complete Rust artifact removal- Removing both
moneroandmonero_cdirectories aligns with the new submodule structure- Logical sequence: clean → remove → update submodules
109-109: Minor formatting improvement.Good practice to ensure the file ends with a newline.
This should be a cargo patch |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
monero-sys/build.rs (1)
60-61: Fix .expect() message format (duplicate issue).The
.expect()messages don't follow the project's coding guidelines format.
🧹 Nitpick comments (1)
monero-sys/build.rs (1)
238-238: Simplify redundant format! macro usage.The
format!("-I.")is unnecessary since it just produces a literal string.- .build_arg(format!("-I.")) + .build_arg("-I.")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
monero-sys/build.rs(10 hunks)
🔇 Additional comments (14)
monero-sys/build.rs (14)
3-3: LGTM: Clean trait import for I/O operations.The
Write as _import follows Rust idioms for importing traits when only their methods are needed.
25-51: LGTM: Well-structured patch array expansion.The embedded patches are consistently defined with clear names and descriptions. The expansion from 1 to 5 patches supports the broader cross-platform build improvements.
53-90: LGTM: Solid real-time output streaming implementation.The function correctly uses threading to handle stdout/stderr streams non-blockingly, which is essential for showing make command progress in real-time.
110-112: LGTM: Good practice for build script output.Explicitly flushing stdout/stderr ensures build output is properly displayed, which is especially important for CI environments.
113-134: LGTM: Robust directory copying with existence check.The logic properly handles existing depends directories and uses appropriate error handling with meaningful messages.
135-142: LGTM: Clean target normalization implementation.The match statement implementation follows the suggestion from previous reviews and is more maintainable than multiple if statements.
164-182: LGTM: Well-integrated make command execution.The command setup and execution properly uses the new streaming function to provide real-time feedback during the potentially long-running dependency build process.
186-197: LGTM: Proper integration with depends toolchain system.The toolchain file configuration and library search paths correctly integrate with the contrib/depends build system for cross-compilation.
221-231: LGTM: Explicit sodium library configuration.Clear specification of both the library name and include path ensures proper linking across different build environments.
341-346: LGTM: Fixed clang runtime library paths for macOS.Replacing dynamic Homebrew detection with fixed paths provides more reliable builds, especially in CI environments.
382-390: LGTM: Appropriate Windows static linking configuration.The conditional Windows-specific library linking and static runtime flags are correctly configured for mingw-w64 builds.
411-416: LGTM: Proper iOS deployment target configuration.The minimum iOS version settings correctly address the missing symbols issue mentioned in the PR objectives.
424-430: LGTM: Proper integration with contrib/depends system.Replacing hardcoded Homebrew paths with dynamic contrib/depends paths ensures consistent builds across platforms and removes external dependencies.
528-538: LGTM: Smart patch idempotency check.Using reverse patch application to detect already-applied patches is a robust approach that makes the build script idempotent and prevents failures on subsequent builds.
| if target.contains("linux") && target.contains("x86_64") { | ||
| println!("cargo:rustc-link-search=native=/usr/lib/x86_64-linux-gnu"); | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Linux library path partially improved but still needs architecture-aware solution.
While adding the x86_64 check prevents incorrect paths on non-x86_64 targets, it doesn't provide library paths for other architectures like aarch64-linux-gnu. Consider using the target-specific lib directory from contrib/depends instead of hardcoded system paths.
- if target.contains("linux") && target.contains("x86_64") {
- println!("cargo:rustc-link-search=native=/usr/lib/x86_64-linux-gnu");
- }
+ // Library paths should come from contrib/depends instead of system paths
+ // The contrib/depends/{target}/lib path is already added above on line 193-197🤖 Prompt for AI Agents
In monero-sys/build.rs around lines 274 to 276, the current code only adds a
library path for x86_64 Linux targets using a hardcoded system path, which
excludes other architectures like aarch64. Update the logic to detect the target
architecture dynamically and set the library path accordingly by referencing the
target-specific lib directory inside contrib/depends instead of hardcoding
system paths. This ensures correct library paths for all supported
architectures.
| } | ||
|
|
||
| let contrib_depends_dir = out_dir_depends; | ||
|
|
There was a problem hiding this comment.
Bug: Build Script Errors: Path, Rust Version, Error Masking
The build script contains three issues:
- Incorrect directory path: The
fs_extra::copy_itemscall withcopy_inside(true)creates a nestedout_dir/depends/dependsdirectory structure. However, subsequent code incorrectly assumes the path isout_dir/depends, leading to build failures. - Rust version incompatibility: The use of
fs::exists()requires Rust 1.83.0, causing compilation errors on older toolchains. - Masked filesystem errors: The
unwrap_or(false)on theexists()check hides actual filesystem errors (e.g., permissions, I/O), potentially leading to silent failures or unexpected behavior.
Locations (1)
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
monero-sys/build.rs (1)
289-291: Linux library path partially improved but still needs architecture-aware solution.While adding the x86_64 check prevents incorrect paths on non-x86_64 targets, it doesn't provide library paths for other architectures like aarch64-linux-gnu. Consider using the target-specific lib directory from contrib/depends instead of hardcoded system paths.
The library paths should come from contrib/depends instead of system paths since the contrib/depends/{target}/lib path is already added above on lines 208-212.
🧹 Nitpick comments (4)
monero-sys/build.rs (2)
54-91: Fix .expect() message format in execute_child_with_pipe function.The
.expect()messages on lines 61-62 don't follow the coding guidelines format.- let stdout = child.stdout.take().expect("Failed to get stdout"); - let stderr = child.stderr.take().expect("Failed to get stderr"); + let stdout = child.stdout.take().expect("child stdout to be available"); + let stderr = child.stderr.take().expect("child stderr to be available");
170-194: Make command execution needs .expect() message format fix.The command execution logic is sound, but the .expect() message on line 187 should follow coding guidelines.
- .expect("make command to be executable"); + .expect("make command to execute successfully");src-tauri/Cargo.toml (2)
15-15: Re-evaluate the broad2.*version spec for all Tauri crates.
"2.*"resolves to>=2.0.0, <3.0.0, i.e. any future minor release. While this eases upgrades, it can silently pull in breaking changes (Tauri follows semver but has had regressions across minors). Consider pinning to the tested minor ("=2.0.x"or caret + minor) and bump intentionally.Also applies to: 25-33
39-40: Movetauri-plugin-cliandtauri-plugin-single-instanceto[dev-dependencies]if not used at runtime.Both plugins are conditionally compiled only for desktop. If they’re utilised solely during development/testing (e.g. via
tauri dev), shifting them todev-dependenciestrims the final binary size.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src-tauri/gen/apple/unstoppableswap-gui-rs.xcodeproj/project.pbxprojis excluded by!**/gen/**
📒 Files selected for processing (6)
monero-sys/build.rs(11 hunks)src-tauri/Cargo.toml(2 hunks)src-tauri/capabilities/default.json(0 hunks)src-tauri/capabilities/desktop.json(1 hunks)src-tauri/src/lib.rs(1 hunks)src-tauri/tauri.conf.json(1 hunks)
💤 Files with no reviewable changes (1)
- src-tauri/capabilities/default.json
✅ Files skipped from review due to trivial changes (1)
- src-tauri/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- src-tauri/tauri.conf.json
🧰 Additional context used
📓 Path-based instructions (2)
src-tauri/Cargo.toml
📄 CodeRabbit Inference Engine (AGENT.md)
The
src-tauri/Cargo.tomlfile is frequently edited and should be reviewed carefully for dependency and configuration changes
Files:
src-tauri/Cargo.toml
monero-sys/**/build.rs
📄 CodeRabbit Inference Engine (monero-sys/CLAUDE.md)
In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX to build the bridge, and link required static and dynamic libraries.
Files:
monero-sys/build.rs
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to swap/Cargo.toml : The `swap/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX to build the bridge, and link required static and dynamic libraries.
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to src-tauri/Cargo.toml : The `src-tauri/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, use the `cxx::bridge` macro to define the FFI interface, declare C++ types and functions, and wrap static C++ methods as free functions.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : In src/bridge.rs, when adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, and add wrapping logic in src/lib.rs.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptr<std::string>.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, use wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns (never expose raw pointers, implement Send and Sync, use Pin for C++ objects requiring stable memory addresses).
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Use `unsafe` only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Always verify method signatures in the Monero C++ headers before adding them to the Rust bridge.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Raw pointers must be wrapped in safe Rust types, and `unsafe` is only used at the FFI boundary.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the unsafe extern "C++" block in bridge.rs, 3. Create a corresponding Rust wrapper in lib.rs, 4. For functions returning strings or with CXX limitations, add helper functions in bridge.h.
src-tauri/Cargo.toml (4)
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to src-tauri/Cargo.toml : The src-tauri/Cargo.toml file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to swap/Cargo.toml : The swap/Cargo.toml file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to Cargo.lock : The Cargo.lock file is frequently edited and should be reviewed carefully for dependency lock changes
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to src-tauri/tauri.conf.json : The src-tauri/tauri.conf.json file is frequently edited and should be reviewed for correct Tauri configuration
monero-sys/build.rs (16)
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX to build the bridge, and link required static and dynamic libraries.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : In src/bridge.rs, when adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, and add wrapping logic in src/lib.rs.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, use the cxx::bridge macro to define the FFI interface, declare C++ types and functions, and wrap static C++ methods as free functions.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, use wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns (never expose raw pointers, implement Send and Sync, use Pin for C++ objects requiring stable memory addresses).
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Use unsafe only for FFI interactions with Monero C++ code.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/bridge.h : In bridge.h, provide helper functions to work around CXX limitations, including wrappers for static methods and handling string returns with std::unique_ptrstd::string.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Raw pointers must be wrapped in safe Rust types, and unsafe is only used at the FFI boundary.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the unsafe extern "C++" block in bridge.rs, 3. Create a corresponding Rust wrapper in lib.rs, 4. For functions returning strings or with CXX limitations, add helper functions in bridge.h.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types and use the OnceLock pattern to ensure WalletManager is a singleton.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Always verify method signatures in the Monero C++ headers before adding them to the Rust bridge.
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to swap/Cargo.toml : The swap/Cargo.toml file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to src-tauri/Cargo.toml : The src-tauri/Cargo.toml file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Applies to monero-sys/src/**/*.rs : When using .expect(), the message should be a short description of the assumed invariant in the format of .expect("the invariant to be upheld").
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.401Z
Learning: Applies to Cargo.lock : The Cargo.lock file is frequently edited and should be reviewed carefully for dependency lock changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:32.994Z
Learning: Use Rust 2021 edition.
⏰ 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 (11)
monero-sys/build.rs (9)
25-52: Enhanced patch system looks comprehensive.The expansion from one to five embedded patches with descriptive names and documentation is well-structured. The macro-based approach ensures compile-time inclusion of patch files.
114-135: Directory copying logic is robust with proper error handling.The approach of checking for existing depends directory before copying and using fs_extra for recursive copying is well-implemented. The .expect() message format on line 115 correctly follows coding guidelines.
136-158: Target normalization and validation is well-structured.The match statement approach for target normalization is clean and maintainable. The target validation ensures only supported platforms proceed with the build.
200-254: CMake configuration with contrib/depends integration looks solid.The toolchain file usage and sodium library configuration are correctly implemented. The intentional CMAKE_CROSSCOMPILING=OFF setting aligns with past review learnings.
355-361: Fixed clang runtime library paths are appropriate for macOS.The hardcoded paths for different clang versions provide necessary runtime library access. The exclusion of iOS targets is correct since they have different runtime requirements.
397-405: Windows-specific static linking configuration is well-implemented.The conditional static linking of boost_locale, boost_program_options, and iconv for mingw-w64 targets addresses Windows-specific requirements. The static linking flags for libstdc++ and libgcc are correct for standalone Windows binaries.
426-431: iOS-specific configuration addresses linker requirements.The minimum iOS version setting and deployment target environment variable correctly address the ___chkstk_darwin availability mentioned in the PR objectives.
439-445: CXX bridge include paths properly integrate contrib/depends.The inclusion of the target-specific include directory from contrib/depends ensures proper header resolution for cross-compilation scenarios.
544-551: Improved patch application logic with reverse-check is excellent.The reverse application check to detect already-applied patches prevents duplicate application and potential corruption. This is a significant improvement over the previous implementation.
src-tauri/capabilities/desktop.json (1)
4-4: Confirm the expanded CLI permission is strictly necessary for desktop.
cli:allow-cli-matchesrelaxes the sandbox around arbitrary CLI argument patterns. Double-check that this capability is required only on desktop (and not on mobile) and that no additional validation is needed in the Rust side when the flag is enabled.src-tauri/Cargo.toml (1)
36-36: Ignore decompression warning for the zip crateDisabling default features on the
zipcrate will indeed turn off deflate support, but in this codebase the crate is only used to write ZIP archives (viaZipWriterandSimpleFileOptions::default()), and there is no decompression logic anywhere.• No usages of
ZipArchive(or any read/decompress paths) were found
•SimpleFileOptions::default()automatically falls back toCompressionMethod::Storedwhendeflateis disabled, so writing still succeedsYou can safely disregard this comment.
Likely an incorrect or invalid review comment.
- Keep new workspace structure with additional crates (swap-env, swap-feed, etc.) - Exclude both monero-sys/monero_c and monero-sys/monero in dprint.json - Merge iOS build patches with macOS Homebrew improvements in monero-sys/build.rs - Keep exact version pinning for iOS compatibility and add dfx-swiss-sdk - Use vergen-git2 from cyjan branch instead of vergen from master - Keep product_name approach for window title - Resolve all merge conflicts maintaining iOS build support while incorporating master improvements
- Change from Rust 1.85 to nightly to support yamux unstable features - This resolves the unsigned_is_multiple_of compilation error
removed