Skip to content

Refactor host import handling and update related tests#23

Merged
arnoox merged 3 commits intomainfrom
refactor/wasm-env-context-struct
Mar 16, 2026
Merged

Refactor host import handling and update related tests#23
arnoox merged 3 commits intomainfrom
refactor/wasm-env-context-struct

Conversation

@arnoox
Copy link
Owner

@arnoox arnoox commented Mar 15, 2026

  • Introduced env module to encapsulate environment-related code generation.
  • Removed needs_host field from IR functions and signatures, simplifying function metadata.
  • Updated function signatures to use Env instead of host, reflecting the new environment structure.
  • Adjusted tests to accommodate changes in function signatures and environment handling.
  • Replaced EnvImports trait with ModuleHostTrait for better clarity and consistency in host implementations.
  • Modified memory and global handling in tests to align with the new environment structure.
  • Ensured all relevant tests pass with the updated code structure.

Arnaud Riess and others added 3 commits March 15, 2026 19:59
- Introduced `env` module to encapsulate environment-related code generation.
- Removed `needs_host` field from IR functions and signatures, simplifying function metadata.
- Updated function signatures to use `Env` instead of `host`, reflecting the new environment structure.
- Adjusted tests to accommodate changes in function signatures and environment handling.
- Replaced `EnvImports` trait with `ModuleHostTrait` for better clarity and consistency in host implementations.
- Modified memory and global handling in tests to align with the new environment structure.
- Ensured all relevant tests pass with the updated code structure.
All exported module functions now take host as an explicit parameter.
Update calls to sum_array, double_array, and memory_info to pass &mut host.
Also update trait impl from EnvImports to ModuleHostTrait for consistency.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@arnoox arnoox merged commit 9d192ea into main Mar 16, 2026
1 check passed
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