caoccao / Javet

Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding Node.js and V8 in Java.
https://www.caoccao.com/Javet/
Apache License 2.0
738 stars 69 forks source link

[Feature Request] Custom Snapshots #399

Closed SinfullySoul closed 1 month ago

SinfullySoul commented 1 month ago

Request to allow to take custom snapshots of the v8 runtime though javet-core

caoccao commented 1 month ago

Sorry, I don't quite get what you are requesting. Could you be more specific?

SinfullySoul commented 1 month ago

what i mean by snapshot is save the entire state of the runtime (including global objects, functions, and variables) and reload it later. V8 engine supports creating custom snapshots that captures the state of the V8 heap and can be used to initialize a new V8 runtime with that saved state.

caoccao commented 1 month ago

I'm not sure if this doc works for you. Basically, you can run arbitrary scripts in arbitrary times before creating the snapshot in Javet V8 mode.

SinfullySoul commented 1 month ago

how did i miss that in doc o-well, this does help thanks & sorry for opening this issue