Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add wasmtime 0.28.0 to ci #118

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

add wasmtime 0.28.0 to ci #118

wants to merge 16 commits into from

Conversation

plicease
Copy link
Member

@plicease plicease commented Nov 4, 2022

  • the wasmtime.h file has been broken out into several files now in the wasmtime directory so diff'ing the header directory is not helpful
  • there are a bunch of symbols that were added and removed
0.27.0:
  - wasi_instance_bind_import
  - wasi_instance_delete
  - wasi_instance_new
  - wasm_externtype_as_instancetype
  - wasm_externtype_as_instancetype_const
  - wasm_externtype_as_moduletype
  - wasm_externtype_as_moduletype_const
  - wasm_instance_type
  - wasm_instancetype_as_externtype
  - wasm_instancetype_as_externtype_const
  - wasm_instancetype_copy
  - wasm_instancetype_delete
  - wasm_instancetype_exports
  - wasm_instancetype_vec_copy
  - wasm_instancetype_vec_delete
  - wasm_instancetype_vec_new
  - wasm_instancetype_vec_new_empty
  - wasm_instancetype_vec_new_uninitialized
  - wasm_module_type
  - wasm_moduletype_as_externtype
  - wasm_moduletype_as_externtype_const
  - wasm_moduletype_copy
  - wasm_moduletype_delete
  - wasm_moduletype_exports
  - wasm_moduletype_imports
  - wasm_moduletype_vec_copy
  - wasm_moduletype_vec_delete
  - wasm_moduletype_vec_new
  - wasm_moduletype_vec_new_empty
  - wasm_moduletype_vec_new_uninitialized
  - wasmtime_externref_new_with_finalizer
  - wasmtime_func_as_funcref
  - wasmtime_func_new_with_env
  - wasmtime_funcref_as_func
  - wasmtime_funcref_table_get
  - wasmtime_funcref_table_grow
  - wasmtime_funcref_table_new
  - wasmtime_funcref_table_set
  - wasmtime_linker_get_one_by_name
  - wasmtime_store_add_fuel
  - wasmtime_store_fuel_consumed
  - wasmtime_store_gc
0.28.0:
  - wasm_foreign_as_ref
  - wasm_foreign_as_ref_const
  - wasm_foreign_copy
  - wasm_foreign_delete
  - wasm_foreign_get_host_info
  - wasm_foreign_new
  - wasm_foreign_same
  - wasm_foreign_set_host_info
  - wasm_foreign_set_host_info_with_finalizer
  - wasm_frame_copy
  - wasm_func_as_extern_const
  - wasm_global_as_extern_const
  - wasm_memory_as_extern_const
  - wasm_ref_as_extern
  - wasm_ref_as_extern_const
  - wasm_ref_as_foreign
  - wasm_ref_as_foreign_const
  - wasm_ref_as_func
  - wasm_ref_as_func_const
  - wasm_ref_as_global
  - wasm_ref_as_global_const
  - wasm_ref_as_instance
  - wasm_ref_as_instance_const
  - wasm_ref_as_memory
  - wasm_ref_as_memory_const
  - wasm_ref_as_module
  - wasm_ref_as_module_const
  - wasm_ref_as_table
  - wasm_ref_as_table_const
  - wasm_ref_as_trap
  - wasm_ref_as_trap_const
  - wasm_table_as_extern_const
  - wasmtime_caller_context
  - wasmtime_context_add_fuel
  - wasmtime_context_fuel_consumed
  - wasmtime_context_gc
  - wasmtime_context_get_data
  - wasmtime_context_set_data
  - wasmtime_context_set_wasi
  - wasmtime_extern_delete
  - wasmtime_extern_type
  - wasmtime_externref_clone
  - wasmtime_externref_delete
  - wasmtime_externtype_as_instancetype
  - wasmtime_externtype_as_moduletype
  - wasmtime_func_type
  - wasmtime_global_get
  - wasmtime_global_type
  - wasmtime_instance_export_get
  - wasmtime_instance_export_nth
  - wasmtime_instance_type
  - wasmtime_instancetype_as_externtype
  - wasmtime_instancetype_copy
  - wasmtime_instancetype_delete
  - wasmtime_instancetype_exports
  - wasmtime_linker_get
  - wasmtime_memory_data
  - wasmtime_memory_data_size
  - wasmtime_memory_grow
  - wasmtime_memory_new
  - wasmtime_memory_size
  - wasmtime_memory_type
  - wasmtime_module_clone
  - wasmtime_module_delete
  - wasmtime_module_type
  - wasmtime_moduletype_as_externtype
  - wasmtime_moduletype_copy
  - wasmtime_moduletype_delete
  - wasmtime_moduletype_exports
  - wasmtime_moduletype_imports
  - wasmtime_store_context
  - wasmtime_store_delete
  - wasmtime_store_new
  - wasmtime_table_get
  - wasmtime_table_grow
  - wasmtime_table_new
  - wasmtime_table_set
  - wasmtime_table_size
  - wasmtime_table_type
  - wasmtime_trap_new
  - wasmtime_val_copy
  - wasmtime_val_delete
  • Wasm::Wasmtime::ModuleType should stringify in the same manner as Wasm::Wasmtime::Module

@plicease
Copy link
Member Author

plicease commented Nov 4, 2022

I think the place to start is to revisit the store class. It now has a context class that lives along side it, so getting the context should keep the store around until the context also falls out of scope. The WasiConfig now gets put into the context instead of a WasiInstance which has gone away. In the last commit I removed the gc method from store, but we can add it back as a compatibility layer calling gc on the context instead. The $store->gc should probably warn if called, telling the user to use the context version instead.

WasiInstance should maybe throw an exception if there is an attempt to instantiate it in 0.28, and code that is currently using it can be re-written to use $store->context instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant