Commit Graph

127 Commits

Author SHA1 Message Date
Lachlan Sneff
9cfda6800f Try to return an error from call_protected when an exception occurs.
Something breaks pretty drastically sometimes, not sure why.
2019-03-02 19:08:15 -08:00
Lachlan Sneff
caf2205936 Add a signal handler for macos and linux.
Implementation Notes:
- To avoid setjmp, longjmp, and the mess that those create, we instead set the interrupting
    context of the signal handler to return into the `throw_trap` routine. To my surprise,
    this actually works. The stack ends up getting unwound normally and the memory-oob error
    is caught by the trampoline.
2019-03-02 17:00:05 -08:00
Lachlan Sneff
9a90689b93 Add preliminary support for throwing and catching uncatchable exceptions.
Additional info:
- WebAssembly "traps" are uncatchable, but are still caught by the trampoline caller.
2019-03-02 12:57:35 -08:00
Lachlan Sneff
87ddf4f855 Add personality function.
- This is part of supporting exceptions in the future.
2019-03-02 10:20:18 -08:00
Lachlan Sneff
362e5aa160 Fix issue caused by dangling instruction.
- Come on inkwell, I thought you were better than this.
2019-03-01 20:28:27 -08:00
Lachlan Sneff
3717c5720d Get control flow (at least according to the llvm verifier) working.
Next up:
- Importing vm intrinsics.
2019-03-01 15:48:43 -08:00
Lachlan Sneff
6a20676fa9 Actually unmap the code after it's done being used 2019-02-28 17:20:18 -08:00
Lachlan Sneff
359ac5abec Connect part of the llvm backend to the runtime 2019-02-28 13:18:00 -08:00
Syrus
16d62ace52 Fixed cache example (again) 2019-02-22 12:17:49 -08:00
Syrus
b3dd47bce8 Fixed runtime example 2019-02-22 12:06:22 -08:00
Syrus
84042cecb3 Fixed wrong syntax 2019-02-22 12:00:30 -08:00
Syrus
fdb2a67579 Added cache into standalone app 2019-02-22 11:42:36 -08:00
Lachlan Sneff
f1b190743b Change file.write to file.write_all 2019-02-21 17:11:28 -08:00
Lachlan Sneff
696fd8fce3 Update api again and change SerializedCache to Artifact 2019-02-21 17:07:04 -08:00
Lachlan Sneff
64eadad7fa Fix review comments 2019-02-21 15:31:20 -08:00
Lachlan Sneff
f9d7d56195 Add documentation and make load safe 2019-02-21 14:00:33 -08:00
Lachlan Sneff
7fa818ea06 Finalize new cache api 2019-02-21 11:47:28 -08:00
Lachlan Sneff
336c1d9c5f Fix lint 2019-02-20 17:00:48 -08:00
Lachlan Sneff
82eea00a02 Saved 2019-02-19 15:36:22 -08:00
Lachlan Sneff
e381bbd07b Use ModuleInfo instead of ModuleInner when possible 2019-02-18 11:56:20 -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
2f2f86a4de
Add feature flag to output debug information while running wasm (#147)
* Generate debug info during execution

* feature cfg debug output
2019-02-06 15:43:27 -08:00
Lachlan Sneff
00db5410c5 Change memory access api again 2019-02-04 23:07:58 -08:00
Lachlan Sneff
dcc75b98ba Fix some tests 2019-02-02 16:02:28 -08:00
Lachlan Sneff
ccd43df767 Instantiate takes reference 2019-02-02 15:58:33 -08:00
Lachlan Sneff
eba66f3b33 Add typed functions and weird type parameter things 2019-02-02 15:28:50 -08:00
Lachlan Sneff
69e9c5154d Add Pages and Bytes newtypes 2019-01-29 15:44:15 -08:00
Lachlan Sneff
581363119b More review fixes 2019-01-29 13:04:42 -08:00
Lachlan Sneff
951daddca2 allow clippy lint aligned pointers 2019-01-29 10:31:44 -08:00
Lachlan Sneff
5aa7d71ede
Merge branch 'master' into feature/improve-importing 2019-01-29 10:28:18 -08:00
Lachlan Sneff
a60132344b Fix lint, reexport tables and globals 2019-01-29 10:25:56 -08:00
Lachlan Sneff
a58f3318f0 Modify imports macro to work with all things that are exports 2019-01-25 16:40:07 -08:00
Lachlan Sneff
db3a20a76b reexport memory 2019-01-25 15:33:15 -08:00
Syrus
29a3af11fc Updated lib crate versions 2019-01-25 10:38:31 -08:00
Syrus
136b68b6eb Added README to wasmer-runtime crate 2019-01-24 13:53:45 -08:00
Syrus
87d02d8399 Updated runtime and runtime-core versions 2019-01-24 13:45:25 -08:00
Lachlan Sneff
a20627964c
Improve runtime docs and add readme (#118)
* Add crate-level documentation

* add runtime readme

* Fix lint
2019-01-24 10:51:20 -08:00
Syrus
2973a32502 Updated cargo 2019-01-23 16:59:37 -08:00
Lachlan Sneff
bc2e527bb2 Add func method to Instance 2019-01-23 15:30:35 -08:00
Lachlan Sneff
ab65477d1f
Refine the runtime api and document the exposed items (#115)
* private module, remove unused method, docs on compile_with

* refine runtime api and document exposed items

* Fix integration test build

* Fix lint
2019-01-23 12:34:15 -08:00
Syrus
88eb1d39a5 Improved Cargo congif
# Conflicts:
#	lib/clif-backend/Cargo.toml
2019-01-22 15:34:52 -08:00
Syrus
453801b5ff Added VERSION var to all the lib crates 2019-01-22 15:34:29 -08: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
Lachlan Sneff
39ddd8f258 Add imports macro 2019-01-21 16:24:49 -08:00
Lachlan Sneff
c7520035fd Fix macro AGAIN 2019-01-21 15:25:51 -08:00
Lachlan Sneff
dbd0f99514 Fix argument type conversion 2019-01-21 15:21:51 -08:00
Lachlan Sneff
29d053cb29 Fix macro again and inline docs 2019-01-21 15:10:07 -08:00
Lachlan Sneff
3563741f4f Remove macro feature that is confusing
This reverts commit fbe480cc08.
2019-01-21 14:50:17 -08:00
Lachlan Sneff
fbe480cc08 Fix macro 2019-01-21 14:47:19 -08:00
Lachlan Sneff
10c5aa02a2 Add export_func macro, prelude, and rename imports stuff 2019-01-21 14:43:04 -08:00