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

Fix differences between -sys and -js API #3129

Merged
merged 38 commits into from
Sep 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1fb3fbe
Start fixing diff between -sys and -js API
fschutt Aug 23, 2022
fd80f77
Add u128 support to js/Value
fschutt Aug 23, 2022
b1fac30
Fix f64 -> RawValue in JS API
fschutt Aug 23, 2022
161aa62
More f64 -> RawValue conversion
fschutt Aug 23, 2022
34ddd28
Fix js::Value::from_raw
fschutt Aug 23, 2022
e09e706
Fix NativeWasmTypeInto::from_raw
fschutt Aug 23, 2022
e026812
Fix Function::new to not take self argument
fschutt Aug 23, 2022
59bc9a7
Revert f64 -> RawValue
fschutt Aug 23, 2022
c410d79
Add WasmSlice::is_empty
fschutt Aug 23, 2022
cd34245
Merge branch 'master' into fix-sync-js-sys-api
fschutt Aug 23, 2022
4540e3b
Add Module::custom_sections and FromToNativeWasmType::is_from_store
fschutt Aug 24, 2022
4966ec4
Always return true for is_from_store
fschutt Aug 24, 2022
11de772
Merge branch 'master' into fix-sync-js-sys-api
fschutt Aug 24, 2022
a52856d
Add LinkError to JS API
fschutt Aug 24, 2022
e589318
Added missing cases to InstantiationError
fschutt Aug 24, 2022
93abcce
Add Send + 'static bounds for Function::new_native_with_env
fschutt Aug 24, 2022
4e93a76
Add Instance::new_by_index function
fschutt Aug 24, 2022
55cea22
Add From<TypedFunction> for Function
fschutt Aug 24, 2022
66d293a
Fix Function::ty
fschutt Aug 24, 2022
88e06c4
Fix Table::copy signature
fschutt Aug 24, 2022
2fa85bd
Fix HostFunction trait
fschutt Aug 24, 2022
2e9a58c
Add to_vm_extern / from_vm_extern
fschutt Aug 24, 2022
355be4b
Reexport wasmparser from js
fschutt Aug 24, 2022
bafe1a9
Fix some compilation errors in make test-js
fschutt Aug 24, 2022
037ceca
Remove impl<Args, Rets> From<TypedFunction<Args, Rets>> for Function
fschutt Aug 24, 2022
e788bbc
Fix errors in "make lint"
fschutt Aug 24, 2022
e64882a
Fix error in conversion from u128 to f64 in JS bindings
fschutt Aug 24, 2022
63e2046
Return DefaultCustomSectionsIterator for custom_sections
fschutt Aug 25, 2022
42cbe14
Fix to_vm_extern function in JS
fschutt Aug 25, 2022
14ddcfd
Fix all errors up to the last one
fschutt Aug 26, 2022
2ee6614
cargo fmt && fix issue with function_body_ptr
fschutt Aug 26, 2022
eb91f1b
Merge branch 'master' into fix-sync-js-sys-api
fschutt Aug 26, 2022
329bfb2
Add to_jsvalue / from_jsvalue
fschutt Aug 29, 2022
f2b13f1
make test-js passes
fschutt Aug 29, 2022
68939d6
cargo fmt
fschutt Aug 29, 2022
cdf85a2
Update CHANGELOG
fschutt Aug 29, 2022
a5d0944
Merge branch 'master' into fix-sync-js-sys-api
fschutt Aug 31, 2022
3dc2e26
Fix merge errors
fschutt Aug 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added missing cases to InstantiationError
  • Loading branch information
fschutt committed Aug 24, 2022
commit e589318e4fb515da437a233aa4e9b9d28916992e
10 changes: 8 additions & 2 deletions lib/api/src/js/error.rs
Original file line number Diff line number Diff line change
@@ -178,14 +178,20 @@ pub enum LinkError {
#[derive(Debug)]
#[cfg_attr(feature = "std", derive(Error))]
pub enum InstantiationError {

/// A linking ocurred during instantiation.
#[cfg_attr(feature = "std", error("Link error: {0}"))]
Link(String),
#[cfg_attr(feature = "std", error(transparent))]
Link(LinkError),

/// A runtime error occured while invoking the start function
#[cfg_attr(feature = "std", error(transparent))]
Start(RuntimeError),

/// The module was compiled with a CPU feature that is not available on
/// the current host.
#[cfg_attr(feature = "std", error("missing required CPU features: {0:?}"))]
CpuFeature(String),

/// Import from a different [`Store`].
/// This error occurs when an import from a different store is used.
#[cfg_attr(feature = "std", error("cannot mix imports from different stores"))]