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

Add emscripten functions and types to the C API #1062

Merged
merged 7 commits into from
Dec 17, 2019

Conversation

MarkMcCaskey
Copy link
Contributor

@MarkMcCaskey MarkMcCaskey commented Dec 13, 2019

resolves #574

Left to do:

  • Add tests
  • Add memory set up, etc (need to break up monolithic ("run" function in wasmer_emscripten into pieces)
  • Add passing args, etc

Review

  • Add a short description of the the change to the CHANGELOG.md file

@MarkMcCaskey MarkMcCaskey added 📦 lib-emscripten About wasmer-emscripten 📦 lib-c-api About wasmer-c-api labels Dec 13, 2019
@MarkMcCaskey MarkMcCaskey force-pushed the feature/emscripten-in-c-api branch from 4bbea88 to f1c95a8 Compare December 13, 2019 22:03
@MeirShpilraien
Copy link

@MarkMcCaskey thank you very much on the PR.

Just to make sure how to use it, After compiling my module I will have to call wasmer_emscripten_get_emscripten_globals then I will create wasmer_import_object_t from those globals using wasmer_emscripten_generate_import_object and then I will extend the created wasmer_import_object_t with my own modules and call wasmer_module_import_instantiate

Is that right?

@MeirShpilraien
Copy link

@MarkMcCaskey I have tried this branch and now I am not getting the Import not found error and I can create an instance, but now it failed on wasmer_instance_call with this error unknown trap at 0xb08 - segmentation violation. As said before, when running with wasmer binary it runs just fine. Any idea what it might be?

@MeirShpilraien
Copy link

Got it, there was an uninitialized variable that cause the segfault. I can confirm that its working.

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Dec 16, 2019
@bors
Copy link
Contributor

bors bot commented Dec 16, 2019

try

Build succeeded

@MarkMcCaskey MarkMcCaskey changed the title Add foundational emscripten functions and types to C API Add emscripten functions and types to the C API Dec 17, 2019
@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Dec 17, 2019
1062: Add emscripten functions and types to the C API r=syrusakbary a=MarkMcCaskey

resolves #574 

Left to do:
- [x] Add tests
- [x] Add memory set up, etc (need to break up monolithic ("run" function in wasmer_emscripten into pieces)
- [x] Add passing args, etc

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
Co-authored-by: Syrus Akbary <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 17, 2019

Build failed

@MarkMcCaskey
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request Dec 17, 2019
1062: Add emscripten functions and types to the C API r=MarkMcCaskey a=MarkMcCaskey

resolves #574 

Left to do:
- [x] Add tests
- [x] Add memory set up, etc (need to break up monolithic ("run" function in wasmer_emscripten into pieces)
- [x] Add passing args, etc

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
Co-authored-by: Syrus Akbary <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 17, 2019

Build succeeded

@bors bors bot merged commit 83fded4 into master Dec 17, 2019
@bors bors bot deleted the feature/emscripten-in-c-api branch December 17, 2019 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 lib-c-api About wasmer-c-api 📦 lib-emscripten About wasmer-emscripten
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Emscripten imports so can be used from C-API
3 participants