Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate using WASM #803

Open
Wodann opened this issue Feb 14, 2025 · 0 comments
Open

Investigate using WASM #803

Wodann opened this issue Feb 14, 2025 · 0 comments

Comments

@Wodann
Copy link
Member

Wodann commented Feb 14, 2025

We're investigating WASM as an alternative of our native Node.js package, created using N-API. This mainly provides two added benefits:

  • browser support
  • ease of maintainability due to more mature support for tooling (as it's backed by a larger community than N-API)

There are still some concerns about feasibility in EDR's use case that would need to be investigated:

  1. support for background threads; since we're currently using (dependencies that rely on) the tokio runtime
  2. async APIs
  3. composability of a "core" EDR component alongside third-party components that reuse types from the "core" EDR component; to allow for our multi-chain design of "one package per chain type"
  4. overhead of FFI / marshalling of memory
  5. general memory and runtime performance; given that we'll transition from native binaries to interpreted WASM
  6. backwards compatibility of porting over existing N-API interface. Given the high amount of users on Hardhat, very slight changes in API behaviour (w.r.t. undefined fields, nulls, ordering, etc) inherent to N-API, but slightly different in WASM could cause subtle bugs.
    Some helpful references materials that can be used during the exploration:

Definition of Done
A concrete plan for adopting WASM as an alternative or alongside our N-API interface, if possible. The plan should find answers to all aforementioned concerns

@Wodann Wodann added this to EDR Feb 14, 2025
@github-project-automation github-project-automation bot moved this to Inbox in EDR Feb 14, 2025
@Wodann Wodann moved this from Inbox to Todo in EDR Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant