Commit Graph

13 Commits

Author SHA1 Message Date
Mark McCaskey
c58a7e0c37 stub out/add the rest 2019-03-20 16:46:42 -07: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
Syrus
6c7fd55b87 Moved ctx to be the first argument in emscripten 2019-02-09 13:58:18 -08:00
Lachlan Sneff
eba66f3b33 Add typed functions and weird type parameter things 2019-02-02 15:28:50 -08:00
Brandon Fish
909af1250f Convert em imports to imports! macro 2019-01-30 20:03:54 -06:00
Brandon Fish
384c27c4e3 Fix unused variable warnings 2019-01-27 10:58:52 -06:00
Brandon Fish
12def9da25 Update imports for lua example 2019-01-26 17:02:51 -06:00
Syrus
fc1b255d40 Make emscripten work again 2019-01-24 13:04:12 -08:00
Syrus
c627fce9f2 Fixed function signatures 2019-01-23 11:08:24 -08:00
Brandon Fish
157183d212 Update to new runtime 2019-01-23 01:27:13 -06:00
Brandon Fish
74875ed554 Library restructure (#104)
* Move wasmer-runtime to wasmer-runtime-core

* Add the runtime library

* Fix issue with macros using wasmer_runtime, fmt

* Make default compiler dependency optional

* Add instantiate and validate functions
2019-01-22 11:02:06 -08:00
Brandon Fish
e43c3cb2eb cargo fmt 2019-01-18 00:18:13 -06:00
Syrus
de459fa5bd Isolated emscripten in new lib 2019-01-10 21:38:10 -08:00