Closed syabyr closed 2 years ago
Information about snapshots: https://v8.dev/blog/custom-startup-snapshots
If you are using v8pp::context
and currently not passing in an v8::Isolate
then you'd need to do that by setting up your own v8::Isolate
with a configured v8::Isolate::CreateParams
that has a snapshot blob.
https://github.com/pmed/v8pp/blob/c6caf79e401df4d982857d79b4ba23f57f0a7b52/v8pp/context.cpp#L167
After some trying,I found it`s not easy to create a snapshot with v8pp.
some external reference should be passed when creating isolate,such as:
reinterpret_cast
but there still some external reference can not be found:
Unknown external reference 0x20f6000.
I'm doubt it's possible to create a viable V8 snapshot with a wrapped C++ entities. At least the snapshots documentation from the link above states that
There is an important limitation to this: the snapshot can only capture V8’s heap. Any interaction from V8 with the outside is off-limits when creating the snapshot. Such interactions include:
defining and calling API callbacks (i.e. functions created via v8::FunctionTemplate) creating typed arrays, since the backing store may be allocated outside of V8
Hi V8pp Team.
In some situation I want to load v8 snapshot in v8pp based project Is it possible to add this feature?
thanks.