-
Notifications
You must be signed in to change notification settings - Fork 821
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
Fix differences between -sys and -js API #3129
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current progress
|
syrusakbary
reviewed
Aug 23, 2022
|
Progress:
|
Done: // UNFIXABLE:
pub fn wasmer::sys::BaseTunables // (BaseTunables do not exist)
pub struct wasmer::sys::BaseTunables
pub struct field wasmer::sys::BaseTunables::dynamic_memory_offset_guard_size: u64
pub struct field wasmer::sys::BaseTunables::static_memory_bound: Pages
pub struct field wasmer::sys::BaseTunables::static_memory_offset_guard_size: u64
pub fn wasmer::sys::BaseTunables::clone(&self) -> BaseTunables
pub fn wasmer::sys::BaseTunables::create_host_memory(&self, ty: &MemoryType, style: &MemoryStyle) -> Result<VMMemory, MemoryError>
pub fn wasmer::sys::BaseTunables::create_host_table(&self, ty: &TableType, style: &TableStyle) -> Result<VMTable, String>
pub fn wasmer::sys::BaseTunables::for_target(target: &Target) -> Self
pub fn wasmer::sys::BaseTunables::memory_style(&self, memory: &MemoryType) -> MemoryStyle
pub fn wasmer::sys::BaseTunables::table_style(&self, _table: &TableType) -> TableStyle
pub unsafe fn wasmer::sys::BaseTunables::create_vm_memory(&self, ty: &MemoryType, style: &MemoryStyle, vm_definition_location: NonNull<VMMemoryDefinition>) -> Result<VMMemory, MemoryError>
pub unsafe fn wasmer::sys::BaseTunables::create_vm_table(&self, ty: &TableType, style: &TableStyle, vm_definition_location: NonNull<VMTableDefinition>) -> Result<VMTable, String>
#[repr(transparent)] pub struct wasmer::sys::ExternRef
pub const wasmer::sys::ExternRef::WASM_TYPE: Type
pub enum variant wasmer::sys::Value::ExternRef(Option<ExternRef>)
pub fn wasmer::sys::ExternRef::clone(&self) -> ExternRef
pub fn wasmer::sys::ExternRef::downcast<'a, T>(&self, store: &'a impl AsStoreRef) -> Option<&'a T> where T: Any + Send + Sync + 'static + Sized
pub fn wasmer::sys::ExternRef::fmt(&self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
pub fn wasmer::sys::ExternRef::is_from_store(&self, store: &impl AsStoreRef) -> bool
pub fn wasmer::sys::ExternRef::new<T>(store: &mut impl AsStoreMut, value: T) -> Self where T: Any + Send + Sync + 'static + Sized
pub fn wasmer::sys::Value::externref(&self) -> Option<&Option<ExternRef>>
pub fn wasmer::sys::Value::from(val: ExternRef) -> Self
pub fn wasmer::sys::Value::from(val: Option<ExternRef>) -> Self
pub fn wasmer::sys::Value::unwrap_externref(&self) -> &Option<ExternRef>
pub type wasmer::sys::ExternRef::Abi = usize
pub fn wasmer::sys::Store::new_with_tunables(engine: impl Into<Engine>, tunables: impl Tunables + Send + Sync + 'static) -> Self
pub fn wasmer::sys::Store::tunables(&self) -> &dyn Tunables
pub fn wasmer::sys::StoreMut::tunables(&self) -> &dyn Tunables
pub fn wasmer::sys::StoreRef::tunables(&self) -> &dyn Tunables
pub trait wasmer::sys::Tunables
pub trait wasmer::sys::CompilerConfig
pub const wasmer::sys::Function::WASM_TYPE: Type (type Abi => f64 / usize)
pub mod wasmer::sys::vm N
pub trait wasmer::sys::FunctionMiddleware N
pub trait wasmer::sys::ModuleMiddleware N
pub use wasmer::sys::Architecture N
pub use wasmer::sys::Artifact N
pub use wasmer::sys::CpuFeature N
pub use wasmer::sys::CallingConvention N
pub use wasmer::sys::Cranelift N
pub use wasmer::sys::CraneliftOptLevel N
pub use wasmer::sys::FrameInfo N
pub use wasmer::sys::LinkError N
pub use wasmer::sys::Engine N
pub use wasmer::sys::EngineBuilder N
pub use wasmer::sys::Features N
pub use wasmer::sys::MiddlewareError N
pub use wasmer::sys::OperatingSystem N
pub use wasmer::sys::Target N
pub use wasmer::sys::Triple N
pub use wasmer::sys::ParseCpuFeatureError N
pub use wasmer::sys::vm::VMExtern N
pub use wasmer::sys::vm::VMMemory N
pub use wasmer::sys::vm::VMMemoryDefinition N
pub use wasmer::sys::vm::VMTable N
pub use wasmer::sys::vm::VMTableDefinition N
pub use wasmer::sys::raise_user_trap N
pub use wasmer::sys::MiddlewareReaderState N
pub fn wasmer::sys::StoreRef::signal_handler(&self) -> Option<*const TrapHandlerFn<'static>> N
pub fn wasmer::sys::Store::set_trap_handler(&mut self, handler: Option<Box<TrapHandlerFn<'static>>>) N
pub fn wasmer::sys::Module::from_file(store: &impl AsStoreRef, file: impl AsRef<Path>) -> Result<Self, IoCompileError> N
pub fn wasmer::sys::Module::serialize_to_file(&self, path: impl AsRef<Path>) -> Result<(), SerializeError> N
pub fn wasmer::sys::Store::custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn<'_>) -> bool) -> bool N
pub fn wasmer::sys::HostFunction::call_trampoline_address() -> VMTrampoline N
pub fn wasmer::sys::Store::engine(&self) -> &Engine
pub fn wasmer::sys::Store::new(engine: impl Into<Engine>) -> Self
pub fn wasmer::sys::Store::new_with_engine(engine: impl Into<Engine>) -> Self
pub fn wasmer::sys::StoreMut::engine(&self) -> &Engine
pub fn wasmer::sys::StoreRef::engine(&self) -> &Engine
pub type wasmer::sys::Function::Abi = usize
pub use wasmer::sys::HOST
// FIXED:
// pub enum variant wasmer::sys::Value::V128(u128)
// pub fn wasmer::sys::Memory::eq(&self, other: &Self) -> bool
// pub fn wasmer::sys::Exports::get_typed_function<Args, Rets>(&self, store: &impl AsStoreRef, name: &str) -> Result<TypedFunction<Args, Rets>, ExportError> where Args: WasmTypeList, Rets: WasmTypeList
// pub unsafe fn wasmer::sys::Module::deserialize_from_file(store: &impl AsStoreRef, path: impl AsRef<Path>) -> Result<Self, DeserializeError>
// pub unsafe fn wasmer::sys::WasmTypeList::from_slice(store: &mut impl AsStoreMut, slice: &[RawValue]) -> Result<Self, TryFromSliceError>
// pub unsafe fn wasmer::sys::WasmTypeList::write_c_struct_to_ptr(c_struct: <Self as >::CStruct, ptr: *mut RawValue)
// pub unsafe fn wasmer::sys::Value::from_raw(store: &mut impl AsStoreMut, ty: Type, raw: RawValue) -> Self
// pub unsafe fn wasmer::sys::NativeWasmTypeInto::from_raw(store: &mut impl AsStoreMut, raw: RawValue) -> Self
// pub fn wasmer::sys::HostFunction::function_body_ptr() -> *const VMFunctionBody
// pub fn wasmer::sys::WasmSlice::is_empty(self) -> bool
// pub fn wasmer::sys::Exports::get_with_generics<'a, T, Args, Rets>(&'a self, name: &str) -> Result<T, ExportError> where Args: WasmTypeList, Rets: WasmTypeList, T: ExportableWithGenerics<'a, Args, Rets>
// pub fn wasmer::sys::Value::unwrap_v128(&self) -> u128
// pub fn wasmer::sys::Value::v128(&self) -> Option<u128>
// pub fn wasmer::sys::Value::as_raw(&self, store: &impl AsStoreRef) -> RawValue
// pub fn wasmer::sys::NativeWasmTypeInto::into_raw(self, store: &mut impl AsStoreMut) -> RawValue
// pub type wasmer::sys::WasmTypeList::ArrayAsMut<[RawValue]>
// pub fn wasmer::sys::Module::custom_sections<'a>(&'a self, name: &'a str) -> impl Iterator<Item = Box<[u8]>> + 'a
// pub fn wasmer::sys::FromToNativeWasmType::is_from_store(&self, _store: &impl AsStoreRef) -> bool
// pub fn wasmer::sys::Imports::imports_for_module(&self, module: &Module) -> Result<Vec<Extern>, LinkError>
// pub enum variant wasmer::sys::InstantiationError::*
// pub fn wasmer::sys::Function::new_native_with_env<T: Send + 'static, F, Args, Rets>(store: &mut impl AsStoreMut, env: &FunctionEnv<T>, func: F) -> Self where F: HostFunction<T, Args, Rets, WithEnv> + 'static + Send + Sync, Args: WasmTypeList, Rets: WasmTypeList
// pub fn wasmer::sys::Instance::new_by_index(store: &mut impl AsStoreMut, module: &Module, externs: &[Extern]) -> Result<Self, InstantiationError>
// pub fn wasmer::sys::InstantiationError::source(&self) -> std::option::Option<&(dyn std::error::Error + 'static)>
// pub fn wasmer::sys::Function::from(other: TypedFunction<Args, Rets>) -> Self
// pub fn wasmer::sys::Function::ty(&self, store: &impl AsStoreRef) -> FunctionType
// pub fn wasmer::sys::Table::copy(store: &mut impl AsStoreMut, dst_table: &Self, dst_index: u32, src_table: &Self, src_index: u32, len: u32) -> Result<(), RuntimeError>
// pub trait wasmer::sys::HostFunction<T, Args, Rets, Kind> where Args: WasmTypeList, Rets: WasmTypeList, Kind: HostFunctionKind
// pub fn wasmer::sys::Extern::from_vm_extern(store: &mut impl AsStoreMut, vm_extern: VMExtern) -> Self
// pub fn wasmer::sys::Extern::to_vm_extern(&self) -> VMExtern
// pub use wasmer::sys::wasmparser
// pub use wasmer::sys::wat2wasm |
fschutt
force-pushed
the
fix-sync-js-sys-api
branch
from
August 26, 2022 16:46
678971c
to
14ddcfd
Compare
@syrusakbary can be reviewed and merged now |
fschutt
changed the title
[WIP] Fix simple cases of differences between -sys and -js API
Fix differences between -sys and -js API
Aug 29, 2022
syrusakbary
approved these changes
Sep 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3054
Review