Hi, I recently played around with the proposal https://github.com/WebAssembly/esm-integration in v8. My plan (which I haven't discussed with the v8 folks) was to create a new class that extends the JavaScript Module class and add it to the public API.
It should allow to return a compiled Wasm module in the ResolveCallback passed during the JavaScript Module instantiation. I know it's not strictly C++ code but maybe I can help you. Sven On Thu, 1 Aug 2019 at 18:29, J Decker <d3c...@gmail.com> wrote: > Maybe there's some hints here for how node does it.... there's very little > to node that is on the C(++) side... > https://github.com/nodejs/node/tree/master/lib/internal/modules/cjs > > https://nodejs.org/api/addons.html > Though that doesn't help actually embedding it. > Although Node does also provide modules like 'os' 'process' ... > > > On Wednesday, July 17, 2019 at 1:02:06 PM UTC-7, Joel Scarfone wrote: >> >> How can i embed v8 such that I can provide a native module? For example: >> >> import {foo} from 'FooBar'; >> >> foo(); >> >> >> How can i get *foo() *to call into native code? >> > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/0c439fa4-a5c4-49b2-9924-a05eedb76b25%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/0c439fa4-a5c4-49b2-9924-a05eedb76b25%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAK1sSrhcr3NHP8xX2xi%2BNY0q%3DV21XRF1oqrpruX6pWTTLGfgiw%40mail.gmail.com.