Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented May 20, 2025

No description provided.

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 sets up basic CI and refactors several code modules for improved formatting and maintainability while adding additional CI workflow steps. Key changes include reordering and formatting improvements in the VM and CLI modules, updates to logging and error messages, and the addition of a GitHub Actions workflow for linting, formatting, and testing.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
wasm-host/src/vm.rs Reordered imports and improved formatting in run_func; duplicated memory allocation logic noted.
wasm-host/src/main.rs Reformatted import order and conditional blocks for better readability.
src/utils/wasm_fingerprint.rs Adjusted import order and digest call style without functional changes.
src/utils/mod.rs Reorganized imports and enhanced multi-line formatting for clarity.
src/main.rs Improved formatting and consistency in user prompts and CLI interaction.
.github/workflows/test.yml Added CI workflow for linting, formatting, and build/test processes.

/// The function expects the WASM module to expose an "allocate" function that allocates memory
/// for the host to write data into.
pub fn run_func<T: SyncInst>(vm: &mut Vm<T>, func_name: &str, tx_data: Vec<u8>, lo_data: Vec<u8>) -> Result<bool, Box<dyn std::error::Error>> {
pub fn run_func<T: SyncInst>(
Copy link

Copilot AI May 20, 2025

Choose a reason for hiding this comment

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

[nitpick] The memory allocation logic for both transaction and ledger object data is duplicated. Consider abstracting this repeated logic into a helper function to improve maintainability.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Out of scope

Copy link
Collaborator

@sappenin sappenin left a comment

Choose a reason for hiding this comment

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

LGTM

@mvadari mvadari merged commit 8ffebd0 into main May 20, 2025
3 checks passed
@mvadari mvadari deleted the linting branch May 20, 2025 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants