Skip to content

Conversation

@mohanson
Copy link
Collaborator

No description provided.

@mohanson mohanson requested a review from Copilot September 11, 2025 07:30
Copy link

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 adds a new benchmark example that demonstrates the performance characteristics of the blake2b hash algorithm using the pywasm WebAssembly interpreter. The example creates a Rust-based WebAssembly module that repeatedly executes the blake2b hash function and includes a Python script to measure execution time.

  • Creates a new Rust crate that implements a benchmarking function using blake2b hashing
  • Adds a Python benchmark runner that loads and executes the WebAssembly module
  • Updates documentation to include the new benchmark example

Reviewed Changes

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

Show a summary per file
File Description
example/blake2b_iter/src/lib.rs Implements the blake2b benchmarking function in Rust
example/blake2b_iter/Cargo.toml Rust project configuration for WebAssembly compilation
example/blake2b_iter/.gitignore Git ignore file for the Rust project
example/blake2b_iter/.cargo/config.toml Cargo configuration targeting WebAssembly
example/blake2b_iter.py Python benchmark runner script
README.md Documentation update adding the new benchmark example

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

@@ -0,0 +1,17 @@
// This function runs the blake2b hash algorithm n times in a loop.
#[unsafe(no_mangle)]
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

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

The unsafe attribute syntax is incorrect. The proper syntax for preventing name mangling is #[no_mangle] without the unsafe wrapper.

Suggested change
#[unsafe(no_mangle)]
#[no_mangle]

Copilot uses AI. Check for mistakes.

@mohanson mohanson merged commit e921ee9 into master Sep 11, 2025
6 checks passed
@mohanson mohanson deleted the update branch September 11, 2025 07:32
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