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(module) Introduce the Module class #47

Merged
merged 3 commits into from
Jun 11, 2019

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Jun 11, 2019

The Module class provides:

  1. __init__ to compile a sequence of bytes into a WebAssembly module,
  2. instantiate to instantiate a module (and get an Instance object),
  3. validate —a static method— to check whether the given bytes represent a valid WebAssembly module.

This patch creates the `Module` class, with so far a single static
method `validate`.
This patch implements 2 methods on `Module`:

  1. `__init__`, i.e. the constructor, i.e. the famous “module.compile” method,
  2. `instantiate` to instantiate a module.
@Hywan Hywan added 🎉 enhancement New feature or request 📚 documentation Do you like to read? 🧪 tests I love tests 📦 component-extension About the Python extension written in Rust labels Jun 11, 2019
@Hywan Hywan self-assigned this Jun 11, 2019
@Hywan
Copy link
Contributor Author

Hywan commented Jun 11, 2019

bors r+

bors bot added a commit that referenced this pull request Jun 11, 2019
47: feat(module) Introduce the `Module` class r=Hywan a=Hywan

The `Module` class provides:

  1. `__init__` to compile a sequence of bytes into a WebAssembly module,
  2. `instantiate` to instantiate a module (and get an `Instance` object),
  3. `validate` —a static method— to check whether the given bytes represent a valid WebAssembly module.

Co-authored-by: Ivan Enderlin <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jun 11, 2019

Build succeeded

@bors bors bot merged commit 88be0cf into wasmerio:master Jun 11, 2019
@syrusakbary
Copy link
Member

This is great!!

This was referenced Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component-extension About the Python extension written in Rust 📚 documentation Do you like to read? 🎉 enhancement New feature or request 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants