Commit Graph

65 Commits

Author SHA1 Message Date
Syrus Akbary
a419ccdf52 Move Webassembly objects to Store and remove Context
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
ptitSeb
bc58b713db Migrate wasmer-cli to new Context API 2022-07-19 15:31:51 +03:00
ptitSeb
cf85615e55 Ported Emscripten to new Context API 2022-07-19 15:31:51 +03:00
Wolfgang Silbermayr
5339f7cdae Fix clippy lints
Fixes: #2926
2022-06-09 16:05:53 +02:00
Amanieu d'Antras
714bac5650 Redesign the API for accessing the contents of a Wasm memory 2022-06-08 14:09:38 +03:00
Mark McCaskey
de6cb9c4c4 Merge branch 'master' into feature/host-env-prototype 2020-11-20 15:54:35 -08:00
Mark McCaskey
2b0464a4b2 Port wasmer-emscripten to use WasmerEnv 2020-11-17 16:19:00 -08:00
Mark McCaskey
cbe91d7141 Make EmEnv immutable 2020-09-30 17:41:40 -07:00
Mark McCaskey
7e9d9cab08 Fix memory issue with Emscripten 2020-08-04 18:15:38 -07:00
Nick Lewycky
2017acf99e Some clippy cleanup. 2020-06-20 13:43:46 -07:00
Mark McCaskey
70e25a7396 Emscripten compiles with no errors! 2020-06-10 17:03:44 -07:00
Mark McCaskey
5a6f4f12de Clean up and port various parts of emscripten 2020-06-10 13:59:36 -07:00
Mark McCaskey
f9d8249a2f Update Emscripten to use new env and new types 2020-06-10 11:52:17 -07:00
Mark McCaskey
c5e8c407ef Add Emscripten with no changes 2020-06-04 11:18:40 -07:00
Syrus
d750d6f30d First version of Wasmer Reborn 2020-08-13 15:03:29 -07:00
Syrus
9942d3ae98 Improved Emscripten / WASI autodetection 2019-09-22 18:23:22 -07:00
losfair
3f0dae3329 Fix compilation on AArch64 Linux. 2019-08-20 16:37:32 -07:00
Brandon Fish
1886760eba Fix issue with emscripten memory out of range 2019-08-19 09:45:14 -05:00
Brandon Fish
57e621d307 Fix emscripten test usage and fix error conditional 2019-08-16 09:57:36 -06:00
Brandon Fish
d1c9ab3539 Convert emscripten memory assertion to error 2019-08-16 09:18:51 -06:00
Brandon Fish
03cabce2d5 Fix emscripten table assertion panic 2019-08-16 09:12:46 -06:00
Syrus
47456b5baa Fixed formatting 2019-08-05 14:37:08 -07:00
Syrus
fed7c79923 Added extra assertions in Emscripten. Fixed #244 2019-08-05 14:15:36 -07:00
Mark McCaskey
6d494a297f fix emscripten tests 2019-07-09 13:41:40 -07:00
Syrus
d3d84cbc22 Formatted emscripten files 2019-07-06 17:46:48 -07:00
Syrus
b1f868dc52 Enable shared memory in emscripten 2019-07-06 17:29:24 -07:00
Syrus
24e7c1b263 Updated compatibility with latest emscripten 2019-07-06 17:15:35 -07:00
Mark McCaskey
281c5ff45d fix bugs in em mapdir, improve it for relative paths, use it more 2019-05-29 14:20:52 -07:00
Mark McCaskey
fc15bc58f6 add mapdir for emscripten; implement getdents, etc. 2019-05-24 18:00:07 -07:00
Mark McCaskey
ab184aceea Update emscripten to run JSC 2019-05-06 14:05:04 -07:00
Syrus
d67bfdb2c5 Renamed dynasm backend to singlepass 2019-04-11 12:44:03 -07:00
Mark McCaskey
b3a765446a fix bug in stat, move lstat64 back to unix 2019-04-08 11:26:25 -07:00
losfair
08f4526b45 Merge remote-tracking branch 'origin/master' into feature/dynasm-backend 2019-03-17 21:14:01 +08:00
Mackenzie Clark
14104c2c8b fix lots of warnings
fix warnings
2019-03-15 14:10:17 -07:00
Brandon Fish
e5d67c9705 Add dynasm feature to emscripten tests 2019-03-13 20:16:07 -05:00
Ivan Enderlin
20d1023abe fix(emscripten) Various warning fixes and cleanups (#266)
* fix(emscripten) Remove unused imports.

This patch removes unused imports reported by `rustc` as warnings.

* fix(emscripten) Allow unreachable patterns in `_clock_gettime`.

The compiler thinks `CLOCK_MONOTONIC_COARSE` is unreachable, which is
not always the case. Add an attribute to allow unreachable patterns to
remove the warning.

* fix(emscripten) Rename unused variables.

This patch renames various unused variables by appending an underscore
to them.

* fix(emscripten) Declare `table` as immutable.

The `table` variable in `EmscriptenGlobals::new` was declared as
mutable, but it's never mutated.

* fix(emscripten) Remove an unnecessary `unsafe` block.

* fix(emscripten) Remove duplicate definition of `SO_NOSIGPIPE`.

The `SO_NOSIGPIPE` constant is defined in `syscalls/mod.rs` and
`syscalls/unix.rs`. It's never used in the first case. We can safely
remove it in this file, and keep it in `unix.rs`.

* fix(emscripten) `read_string_from_wasm` is used only on Windows.

Mark `read_string_from_wasm` as possible deadcode, since it's used
only on Windows.

* fix(emscripten) Remove `DYNAMICTOP_PTR_DIFF`, `stacktop`, `stack_max`,
`dynamic_base` and `dynamic_ptr`.

Four functions and one constant are used together but never used
inside or outside this file. They are deadcode.

* fix(emscripten) Remove `infinity` and `nan` fields of `EmscriptenGlobalsData`.

Those fields are never used.

* fix(emscripten) Allow non snake case in `emscripten_target.rs`.

Many functions in this file don't follow the snake case style for Rust
function names. The reason is that we want the names to match the
emscripten symbol names; even if a mapping is done in `lib.rs`, it's
easier to get the same names.

* fix(emscripten) Rename `STATIC_TOP` to `static_top`.

This variable is not a constant.
2019-03-12 14:00:33 -07:00
Brandon Fish
1957ddef53 Run emscripten tests with both compilers 2019-03-06 21:36:46 -06:00
Lachlan Sneff
9f40eedba8 Get caching working again 2019-02-20 16:41:41 -08:00
Syrus
f52c4ce5cc Merge branch 'master' into feature/ctx-first-arg 2019-02-12 10:28:25 -08:00
Syrus
6c7fd55b87 Moved ctx to be the first argument in emscripten 2019-02-09 13:58:18 -08:00
Mackenzie Clark
4ef7dc339c optimize imports (#170) 2019-02-09 13:31:28 -08:00
Mackenzie Clark
ce03e4464c fill unsetenv for windows (#150)
* fill unsetenv

* update usage of read_string_from_wasm

* convert helper to return String

* correct usage of helper fn, cargo fmt, and check in lock file change
2019-02-07 10:51:19 -08:00
Mackenzie Clark
83df3ad35f fix putenv and setenv for windows (#140) 2019-02-06 18:57:11 -08:00
Lachlan Sneff
8fe9b7eac2 Add caching. (#134)
* Allow a module to have a different signature registry than the process-specific

* Add core ability to build compiled code caches

* Remove timing printouts

* Serialize/Deserialize memories to reduce copies

* Work more on api

* Relocate local functions relatively before external functions

* Fix incorrect definition in test

* merge errors caused by merge

* Fix emscripten compile

* Fix review comments
2019-02-06 16:26:45 -08:00
Lachlan Sneff
eba66f3b33 Add typed functions and weird type parameter things 2019-02-02 15:28:50 -08:00
Brandon Fish
cf325f7cd6 Fixup/comment out to get things compiling 2019-01-29 23:08:03 -06:00
Brandon Fish
ee911092ea Use memory min and max values from module to generate environment memory 2019-01-25 20:12:36 -06:00
Brandon Fish
1a1958a0ce Use table min and max values from module to generate environment table 2019-01-25 19:55:33 -06:00
Syrus
6d8465721f Improved formatting 2019-01-24 15:30:13 -08:00
Syrus
fc1b255d40 Make emscripten work again 2019-01-24 13:04:12 -08:00