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

feat: Wasm module implementation #73

Merged
merged 29 commits into from Feb 2, 2024
Merged

feat: Wasm module implementation #73

merged 29 commits into from Feb 2, 2024

Conversation

Mr-Leshiy
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy commented Jan 30, 2024

Description

An initial WASM module implementation

Related Issue(s)

Closes #65

Description of Changes

  • Added a new wasm Rust module where going to put all WASM specific code
  • Added new Module struct which is a wrapper over wasmtime::Module, wasmtime::InstancePre etc.. It initialises a module from provided wasm module bytes, context, imports.
  • Added a call_func function, to call some export functions of the WASM module from the Rust. Also this function preserves an immutable WASM. state as it was described in the ticket.
  • Added a Context struct which represents a host context to the WASM module, and will be a part of the WASM Store.

@Mr-Leshiy Mr-Leshiy marked this pull request as ready for review January 30, 2024 16:56
saibatizoku
saibatizoku previously approved these changes Jan 31, 2024
Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

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

LGTM.

@Mr-Leshiy
Copy link
Contributor Author

depends on input-output-hk/catalyst-ci#180

@Mr-Leshiy Mr-Leshiy marked this pull request as draft February 1, 2024 08:50
@Mr-Leshiy Mr-Leshiy added do not merge yet PR is not ready to be merged yet review me PR is ready for review labels Feb 1, 2024
@Mr-Leshiy Mr-Leshiy marked this pull request as ready for review February 1, 2024 15:09
saibatizoku
saibatizoku previously approved these changes Feb 1, 2024
Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Joaquín Rosales <casabenita7@gmail.com>
saibatizoku
saibatizoku previously approved these changes Feb 1, 2024
Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

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

👍

hermes/bin/src/wasm/context.rs Outdated Show resolved Hide resolved
hermes/bin/src/wasm/module.rs Outdated Show resolved Hide resolved
hermes/bin/src/wasm/module.rs Outdated Show resolved Hide resolved
hermes/bin/src/wasm/module.rs Outdated Show resolved Hide resolved
hermes/bin/src/wasm/module.rs Outdated Show resolved Hide resolved
hermes/bin/src/main.rs Outdated Show resolved Hide resolved
Co-authored-by: Steven Johnson <stevenj@users.noreply.github.com>
@Mr-Leshiy Mr-Leshiy enabled auto-merge (squash) February 2, 2024 12:17
@Mr-Leshiy Mr-Leshiy removed the do not merge yet PR is not ready to be merged yet label Feb 2, 2024
@Mr-Leshiy Mr-Leshiy merged commit 170207f into main Feb 2, 2024
19 checks passed
@Mr-Leshiy Mr-Leshiy deleted the feat/wasm-module-loader branch February 2, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🛠️ [TASK] : Hermes WASM module impl, with the immutable WASM state
3 participants