Migrate to Chrome V8 from wabt
V8 is Chrome's Javascript and WebAssembly engine. It is well tested in both server and client contexts, and provides multi-tenancy in form of isolates (see https://www.infoq.com/presentations/cloudflare-v8).
The plan is to replace wabt with V8, and have the Oak Manager create an isolate per Oak Node within the same Oak VM (as opposed to the current model in which each Oak Node runs a full independent Oak VM).
On server, a single Oak VM containing a single V8 instance will run within Asylo, relying on the underlying remote attestation mechanism to derive a key for the entire Oak VM; the Oak VM will then derive further keys (one per isolate) that it will use for attestation (both local and remote) between Oak Nodes.
On client, a hypervisor will run the Oak VM in a similar way, and provide it with the necessary key for attestation, which the Oak VM will then use in the same way as for the server case.
In both cases, the Oak VM as a whole is isolated from the host via the underlying enclave technology (Asylo or hypervisor), but isolation between Oak Nodes is only enforced by V8 itself.
test comment to test Slack integration, please ignore
test comment to test Slack integration, please ignore
Is there a Slack group for project oak that can be joined? 😃
This is still on the table, especially as @ipetr0v 's experiments show that CPU-bound code (e.g. XML parsing) is particularly slow in the current Wasm engine.
Perhaps we should consider migrating to https://crates.io/crates/rusty_v8 , the API looks nice now, so it may not be too much work.
The complication seems to be that rusty_v8 main API is for running JS, which presumably can then request the creation of a Wasm module, but there is no API for instantiating a Wasm directly (I think).
Looked into this a bit, it appears that V8's C++ API itself is JS focused and there's no way to directly instantiate WASM without going through JS.
Since v7.8 V8 has a separate build target as a pure WASM execution engine (without JS support): https://v8.dev/blog/v8-release-78#webassembly-c%2Fc%2B%2B-api
However I imagine there's no rust bindings for that yet.
Since V8 does implement the wasm-c-api it seems that Rust bindings would be useful beyond just V8. If none exist yet it might even make sense to write them.
@juliettepretot could you open an issue on https://github.com/denoland/rusty_v8 to check whether there is any plan / desire for Rust bindings directly to the Wasm execution engine?
Can do. :) Not sure if it's priority for deno folks, but worth checking @tiziano88