Skip to content

Conversation

@zees-dev
Copy link
Collaborator

Description

This pull request introduces the mock-ffi feature to enable testing without requiring the Blockless WASM runtime environment.
The changes include updates to the CI pipeline, new feature definitions, documentation enhancements, and conditional implementations of FFI functions for testing purposes.

CI and Feature Updates:

  • .github/workflows/ci.yaml: Added a new step to run tests using the mock-ffi feature in the CI pipeline.
  • Cargo.toml: Introduced the mock-ffi feature to provide mock implementations of FFI functions.

Documentation Enhancements:

  • README.md: Added a section explaining the mock-ffi feature, including its purpose, usage, and limitations, to help developers understand how to run tests without the runtime.

Conditional FFI Implementations:

  • src/cgi.rs: Added conditional compilation for FFI functions using the mock-ffi feature, along with mock implementations for CGI-related functions. [1] [2]
  • src/http.rs: Added conditional compilation and mock implementations for HTTP-related FFI functions. [1] [2]
  • src/llm.rs: Added conditional compilation and mock implementations for LLM-related FFI functions. [1] [2]
  • src/memory.rs: Added conditional compilation and mock implementations for memory-related FFI functions. [1] [2]
  • src/socket.rs: Added conditional compilation and mock implementations for socket-related FFI functions. [1] [2]

@zees-dev zees-dev requested a review from Joinhack June 14, 2025 04:26
@zees-dev zees-dev merged commit 04280f6 into main Jun 15, 2025
1 check passed
@zees-dev zees-dev deleted the feat/mock-ffi-testing branch June 15, 2025 06:09
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.

3 participants