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 marine a WASM virtual machine? #151

Open
xiaoyulei opened this issue Apr 21, 2022 · 3 comments
Open

Is marine a WASM virtual machine? #151

xiaoyulei opened this issue Apr 21, 2022 · 3 comments
Labels
C-question category: a question

Comments

@xiaoyulei
Copy link

I see WebAssembly runtime description of marine in document, but I am not sure if I understand correctly that WebAssembly runtime is a WASM virtual machine or other someting?

@mikevoronov mikevoronov added the C-question category: a question label Apr 25, 2022
@mikevoronov
Copy link
Member

mikevoronov commented Apr 25, 2022

Hi! Thank you for your Q!

Actually, it's a good and a bit definitions-centric topic. Let's first define what runtime and virtual machine(VM) stand for. Quoting this reddit topic (that I personally agree on):

  • A runtime environment is simply all the resources needed to support running the program. This means shared libraries, processes, VMs, whatever put together allows the program to be run on the machine.
  • A VM is a fictional machine, essentially. It behaves like an actual machine, in the sense that you can provide instructions for it separately from source languages.

And from this perspective, Marine behaves like a runtime, meaning that it's not just execute Wasm modules, but provide environment including:

  • host imports (WASI and mounted binary interface intended for calling external CLI binaries),
  • environment folders for services (local and tmp),
  • environment variables accessible during module execution,
  • transparent mechanism for shared-nothing modules linking,
  • support of logging mechanism
  • and other minor resources and support

Moreover, Wasmer (we're using it for Wasm compilation and execution) and Wasmtime claim to be runtime itself (according to readme on their main repos).

Hope I answered your Q, if not please do not hesitate to ask more.

@xiaoyulei
Copy link
Author

Thank you for your clairfy.
Do you implement marine runtime especially for execute Wasm modules from scratch or base on other open source project?

@mikevoronov
Copy link
Member

We're using Wasmer 0.17.1 under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question category: a question
Projects
None yet
Development

No branches or pull requests

2 participants