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

Is it possible to use wasm-micro-runtime as scripting engine? #100

Closed
blockspacer opened this issue Aug 16, 2019 · 2 comments
Closed

Is it possible to use wasm-micro-runtime as scripting engine? #100

blockspacer opened this issue Aug 16, 2019 · 2 comments

Comments

@blockspacer
Copy link

blockspacer commented Aug 16, 2019

Use case: Replace scripting engines like Lua with a faster, light-weight system that’s programmable in several languages (wasm-micro-runtime).

Question: Is it possible to make wasm <-> C++ binding easier? (for example, disable some security features e.t.c.).

Issue: It is hard to import an external class e.t.c. #95

for the security and toolchain reason, it is really not easy to directly access the external class/structure created outside wasm app.

@wenyongh
Copy link
Contributor

Hi, please see #92, we have implemented address validation and conversion API's for both native and app. So now wasm app should be able to convert native pointer which is absolute address to app's address which is relative offset, and then access it, please see the sample. These API's include:

wasm_runtime_get_current_module_inst();
wasm_runtime_validate_native_addr();
wasm_runtime_validate_app_addr();
wasm_runtime_addr_native_to_app();
wasm_runtime_addr_app_to_native();

@blockspacer
Copy link
Author

Awesome work. Thank you for that great Project!

@wenyongh wenyongh closed this as completed Oct 8, 2019
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

No branches or pull requests

2 participants