wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

Add a clone example

Open lum1n0us opened this issue 1 year ago • 0 comments

Use a clone example to show

  • cold start and warm start
  • how to clone from wasm_module_t and bypass loading phase

It turns out that there is a strong requirement of almost everything in wasm_instantiate() except funciton related if do a clone of wasm_instance_t.

Since we tend to isolate user data in threads, it needs to malloc and initialie

  • global. WASMGlobalIntance and global data
  • memory. WAAMMemoryInstance, memory_data and heap
  • table. WASMTableInstance, table_data
  • exports. all global, memory and table

lum1n0us avatar Sep 18 '22 02:09 lum1n0us