WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
534 stars 77 forks source link

Store interface: Expose native objects / v8 profiling #143

Closed oschaaf closed 4 years ago

oschaaf commented 4 years ago

I would like to leverage v8's profiler in istio/envoy. However as it stands it seems there is no way to get to the v8::Isolate associated to a StoreImpl through wasm::Store.

I feel it would be great if there would be a way to expose that. Would adding something like the following to the Store interface [1] be an option?:

// Returns the associated v8::Isolate* in the v8 StoreImpl
auto get_native_store() -> void*; 

[1] https://github.com/WebAssembly/wasm-c-api/blob/340fd9528cc3b26d22fe30ee1628c8c3f2b8c53b/include/wasm.hh#L215

oschaaf commented 4 years ago

So after some more thought and internal discussion, I now feel this is a actually bad idea. So I'm closing this -- sorry about the noise!