Skip to content

Conversation

@joe-p
Copy link
Collaborator

@joe-p joe-p commented Oct 15, 2025

The current approach that uses a feature flag makes it impossible to actually use the FFI algod client in FFI utils because utils FFI wraps the non-FFI utils which uses the non-FFI algod. Thus we need a separate FFI crate so we can convert between the rust models and the FFI-compatible models.

@joe-p joe-p marked this pull request as ready for review October 15, 2025 18:55
@joe-p joe-p requested a review from a team as a code owner October 15, 2025 18:55
@joe-p joe-p requested review from PatrickDinh, Copilot and lempira and removed request for a team and Copilot October 15, 2025 18:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new algod_client_ffi crate to enable FFI (Foreign Function Interface) compatibility for the Algorand algod client. The separation addresses an architectural limitation where feature flags prevented proper FFI integration in the existing utils package.

Key changes:

  • Creates FFI-compatible wrapper models that convert between Rust native types and FFI-safe types
  • Implements bidirectional conversion traits (From/TryFrom) for seamless type translation
  • Establishes a complete API client interface with error handling

Reviewed Changes

Copilot reviewed 298 out of 525 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib.rs Entry point with uniffi scaffolding and module exports
src/apis/mod.rs Error type definitions and API endpoint module organization
src/apis/client.rs Main FFI client implementation wrapping the Rust algod client
src/apis/*.rs (error modules) Individual error type conversions for each API endpoint
src/apis/parameter_enums.rs FFI-compatible enum definitions for API parameters
src/models/mod.rs Model module structure with custom JSON value handling
src/models/*.rs (model files) FFI wrapper structs with conversion implementations

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

@joe-p joe-p marked this pull request as draft October 17, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant