pub unsafe extern "C" fn Dart_CreateSnapshot(
    vm_snapshot_data_buffer: *mut *mut u8,
    vm_snapshot_data_size: *mut isize,
    isolate_snapshot_data_buffer: *mut *mut u8,
    isolate_snapshot_data_size: *mut isize,
    is_core: bool
) -> Dart_Handle
Expand description

Creates a full snapshot of the current isolate heap.

A full snapshot is a compact representation of the dart vm isolate heap and dart isolate heap states. These snapshots are used to initialize the vm isolate on startup and fast initialization of an isolate. A Snapshot of the heap is created before any dart code has executed.

Requires there to be a current isolate. Not available in the precompiled runtime (check Dart_IsPrecompiledRuntime).

\param vm_snapshot_data_buffer Returns a pointer to a buffer containing the vm snapshot. This buffer is scope allocated and is only valid until the next call to Dart_ExitScope. \param vm_snapshot_data_size Returns the size of vm_snapshot_data_buffer. \param isolate_snapshot_data_buffer Returns a pointer to a buffer containing the isolate snapshot. This buffer is scope allocated and is only valid until the next call to Dart_ExitScope. \param isolate_snapshot_data_size Returns the size of isolate_snapshot_data_buffer. \param is_core Create a snapshot containing core libraries. Such snapshot should be agnostic to null safety mode.

\return A valid handle if no error occurs during the operation.