Skip to content

Rename "runtime" to "engine". #256

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

Merged
merged 9 commits into from
Feb 17, 2022

Conversation

PiotrSikora
Copy link
Member

Signed-off-by: Piotr Sikora [email protected]

Signed-off-by: Piotr Sikora <[email protected]>
Copy link
Member Author

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

This has been bugging me for a while, since Proxy-Wasm C++ Host is the runtime, so the other things must be something else... Thoughts?

Signed-off-by: Piotr Sikora <[email protected]>
@mathetake
Copy link
Contributor

this sounds weird to me as engine in general (at least on wasm-c-api layer) means the part of Wasm runtime (wasmtime, wavm, etc) which is the global context per store and in charge of compilation and caches.

@mathetake
Copy link
Contributor

quote from wastime doc https://docs.wasmtime.dev/api/wasmtime/struct.Engine.html :

An Engine which is a global context for compilation and management of wasm modules.

@mathetake
Copy link
Contributor

C++ host IMO is an embedder, not a runtime, so using the word runtime for Wasmtime, V8, etc. sounds reasonable to me, but not strongly objects renaming to engine! Up to you

@PiotrSikora
Copy link
Member Author

C++ host IMO is an embedder, not a runtime, so using the word runtime for Wasmtime, V8, etc. sounds reasonable to me, but not strongly objects renaming to engine! Up to you

Agreed, C++ Host is an embedder of the engine/runtime, but that's not mutually exlusive with either, IMHO.

this sounds weird to me as engine in general (at least on wasm-c-api layer) means the part of Wasm runtime (wasmtime, wavm, etc) which is the global context per store and in charge of compilation and caches.

quote from wastime doc https://docs.wasmtime.dev/api/wasmtime/struct.Engine.html :

An Engine which is a global context for compilation and management of wasm modules.

But that's the part we're referring to here (i.e. engine is the top-level object that manages everything else).

From https://github.com/WebAssembly/wasm-c-api:

Provide a "black box" API for embedding a Wasm engine in other C/C++ applications.

I agree that the terminology is a bit murky, because most of the Wasm engines are included as part of Wasm runtimes, which can start Wasm modules and expose runtime environment for them (WASI, etc.).

But if you look at V8 and JavaScript, it's a bit more clear there:

From https://v8.dev:

What is V8?
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.

From https://nodejs.org/en/:

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

From https://en.wikipedia.org/wiki/Deno_(software):

Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine

From https://github.com/bytecodealliance/wasmtime/tree/main/cranelift:

Wasmtime non-Web wasm engine.

@PiotrSikora
Copy link
Member Author

This article has a good explaination of engine vs runtime, but obviously it's not authoritative:
https://medium.com/@misbahulalam/uncover-the-javascript-engine-vs-runtime-6556ef449634

Signed-off-by: Piotr Sikora <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants