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

Use standard API for js and sys for Module. Added Engine in js #3556

Merged
merged 92 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
d09a76e
Use standard API for js and sys for Module. Added Engine in js
syrusakbary Jan 27, 2023
5a030f5
Fix compile
syrusakbary Jan 28, 2023
42fd09b
Move tunables into engine
syrusakbary Jan 30, 2023
cd730e0
Moved the gross of default store to default_engine
syrusakbary Feb 9, 2023
8c45633
Remove deprecated/unused TrapHandler
syrusakbary Feb 9, 2023
83313eb
Improved sys store
syrusakbary Feb 9, 2023
30f4589
Move StoreId to common wasmer_types
syrusakbary Feb 9, 2023
2a067fd
Made store compiler flags clearer
syrusakbary Feb 9, 2023
4c9a154
Use general store
syrusakbary Feb 9, 2023
24253b8
Remove import_shared_memory
syrusakbary Feb 9, 2023
bb34929
Make function_env common for js/sys
syrusakbary Feb 10, 2023
bd55e7b
Remove unused import in wasi
syrusakbary Feb 10, 2023
039098c
Prepare mem_access commons
syrusakbary Feb 10, 2023
5a829bc
Unify mem_access api for js/sys
syrusakbary Feb 10, 2023
543e7cb
Make CI happy. Fix linting and imports
syrusakbary Feb 10, 2023
293834c
Fix pending test
syrusakbary Feb 10, 2023
59a6b19
Fix linting
syrusakbary Feb 10, 2023
312aaf1
Use RawValue for wasmer js
syrusakbary Feb 10, 2023
0dda3c1
Unified extern_ref in js/sys
syrusakbary Feb 10, 2023
a1d3891
Unify native_type::NativeWasmTypeInto in js/sys
syrusakbary Feb 10, 2023
c3576e1
Unified ptr::WasmPtr into js/sys
syrusakbary Feb 11, 2023
c9e18e8
Fixed Context references
syrusakbary Feb 11, 2023
a5e631c
Unified Value into js/sys
syrusakbary Feb 11, 2023
1e405d3
Unified exports in js/sys
syrusakbary Feb 11, 2023
6ede6a1
Unified api for native in js/sys
syrusakbary Feb 11, 2023
7d9ed6b
Unified typed_function in js/sys
syrusakbary Feb 11, 2023
6c6f070
Remove unnecessary compiler flags in wasmer crate
syrusakbary Feb 11, 2023
9f83b84
Moved js-specific functions to as_js module
syrusakbary Feb 11, 2023
4eaddb5
Unify Imports in wasmer js/sys
syrusakbary Feb 11, 2023
b9d2118
Make instance more uniform
syrusakbary Feb 11, 2023
f8176e3
Make js conversion uniform
syrusakbary Feb 12, 2023
58f27ae
Unify InstantiationError
syrusakbary Feb 12, 2023
3d56b6b
Unify Instance in js/sys
syrusakbary Feb 12, 2023
f72220e
Removed repeated comments
syrusakbary Feb 12, 2023
9225560
Merge branch 'master' into std-api
syrusakbary Feb 12, 2023
1d85b30
Moved reexports one level down
syrusakbary Feb 12, 2023
db6430c
Unified Extern in js/sys
syrusakbary Feb 12, 2023
fcad0fa
Make AsJs work with unified Instance
syrusakbary Feb 12, 2023
3b0ee71
Created vm module
syrusakbary Feb 14, 2023
1966af3
Unified extern::Table in js/sys
syrusakbary Feb 14, 2023
4c0bd5c
Unified Memory in js/sys
syrusakbary Feb 15, 2023
4c0399f
Unified global into js/sys
syrusakbary Feb 15, 2023
7bf1bd1
Fixed as_js for global
syrusakbary Feb 15, 2023
3e7552a
Fix global
syrusakbary Feb 15, 2023
e9b8868
Moved ExternRef and FuncRef into crate::vm for unification
syrusakbary Feb 15, 2023
cd4cb7a
Make function internal APIs closer
syrusakbary Feb 15, 2023
b4c190b
Unified Function into js/sys
syrusakbary Feb 15, 2023
95e351a
Merge branch 'master' into std-api
syrusakbary Feb 15, 2023
c45864a
Universalize MemoryView in js/sys
syrusakbary Feb 16, 2023
99d3f84
Simplified errors
syrusakbary Feb 16, 2023
745a06b
Improved module imports
syrusakbary Feb 16, 2023
5faa036
Improved module imports
syrusakbary Feb 16, 2023
e9a4ba4
Fix linting
syrusakbary Feb 16, 2023
c85b2bf
Implement PartialEq for all externals
syrusakbary Feb 17, 2023
db6dd42
Optimized ModuleInfo usage
syrusakbary Feb 17, 2023
d85297f
Fix linting and compilation
syrusakbary Feb 17, 2023
b61e2a1
Added equality to instance, Module and Exports
syrusakbary Feb 17, 2023
bb9ac04
Make API compatible changes with wasmer-js
syrusakbary Feb 17, 2023
ae6c3ba
Merge branch 'master' into std-api
syrusakbary Feb 18, 2023
1f64ba1
Wrap engine
syrusakbary Feb 24, 2023
9ed86ad
Make cli compilable again
syrusakbary Feb 24, 2023
826d321
Merge branch 'master' into std-api
syrusakbary Feb 24, 2023
a6ebf78
Verious fixes for the wasix merge
syrusakbary Feb 24, 2023
5bdf3d4
Fixed unimplemented
syrusakbary Feb 24, 2023
93def03
Address most of the comments
syrusakbary Feb 25, 2023
fe72a5a
Merge branch 'master' into std-api
syrusakbary Feb 28, 2023
09427c3
Make automatically the trait Into<Engine> conversions
syrusakbary Feb 28, 2023
e26a784
Remove unused code
syrusakbary Feb 28, 2023
f342ebe
Fix serialization
syrusakbary Feb 28, 2023
c04e536
Fix code
syrusakbary Feb 28, 2023
bef5f9e
Merge branch 'master' into std-api
syrusakbary Feb 28, 2023
a0e11bf
Fixed linting
syrusakbary Feb 28, 2023
b47cc83
Removed unsafe js intos
syrusakbary Feb 28, 2023
d5c7b8a
Update lib/api/src/engine.rs
syrusakbary Feb 28, 2023
4fb02b8
Update lib/api/src/engine.rs
syrusakbary Feb 28, 2023
fc64202
Use AtomicUsize instead of AtomicU64
syrusakbary Feb 28, 2023
770bb40
Fixed missing memory export in WASI as the API got simplified
syrusakbary Feb 28, 2023
4973be5
Refactored common WasmTypeList implementations
syrusakbary Mar 1, 2023
4629a32
Use js-generic instead of generic for the js engine
syrusakbary Mar 1, 2023
2511d65
Merge branch 'master' into wasix-fixes-for-web
john-sharratt Mar 2, 2023
cbdf356
Merge branch 'std-api' into wasix-fixes-for-web-with-unification
syrusakbary Mar 2, 2023
1c3f966
Merge branch 'master' into std-api
syrusakbary Mar 2, 2023
9719630
Improved linting
syrusakbary Mar 2, 2023
7440c42
Trying to add support for BigInt
syrusakbary Mar 2, 2023
61ca01d
Fix linting errors
syrusakbary Mar 2, 2023
01dc38e
Improved BigInt support
syrusakbary Mar 2, 2023
69f5ec3
Fixed missing api
syrusakbary Mar 2, 2023
8cbd9b6
Added extra comments on what can be Send/Sync
syrusakbary Mar 3, 2023
acd0f1f
Merge branch 'master' into std-api
syrusakbary Mar 6, 2023
07eb2f6
Improved mem_access
syrusakbary Mar 7, 2023
0a31d66
Make WasmRef/WasmSlice access uniform
syrusakbary Mar 7, 2023
e61c206
Merge branch 'master' into std-api
syrusakbary Mar 7, 2023
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
Make WasmRef/WasmSlice access uniform
  • Loading branch information
syrusakbary committed Mar 7, 2023
commit 0a31d66c95822e215bf98042a5c2febd36934319
24 changes: 0 additions & 24 deletions lib/api/src/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,30 +167,6 @@ where
}
}

impl<'a, T> WasmRefAccess<'a, T>
where
T: wasmer_types::ValueType,
{
/// Reads the address pointed to by this `WasmPtr` in a memory.
#[inline]
#[allow(clippy::clone_on_copy)]
pub fn read(&self) -> T
where
T: Clone,
{
self.as_ref().clone()
}

/// Writes to the address pointed to by this `WasmPtr` in a memory.
#[inline]
pub fn write(&mut self, val: T) {
// Note: Zero padding is not required here as its a typed copy which does
// not leak the bytes into the memory
// https://stackoverflow.com/questions/61114026/does-stdptrwrite-transfer-the-uninitialized-ness-of-the-bytes-it-writes
*(self.as_mut()) = val;
}
}

impl<'a, T> Drop for WasmRefAccess<'a, T>
where
T: wasmer_types::ValueType,
Expand Down
14 changes: 0 additions & 14 deletions lib/api/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ pub struct Instance {
pub exports: Exports,
}

#[cfg(test)]
mod send_test {
use super::*;

fn is_send<T: Send>() -> bool {
true
}

#[test]
fn instance_is_send() {
assert!(is_send::<Instance>());
}
}

impl Instance {
/// Creates a new `Instance` from a WebAssembly [`Module`] and a
/// set of imports using [`Imports`] or the [`imports`] macro helper.
Expand Down
Loading