Commit Graph

298 Commits

Author SHA1 Message Date
Lachlan Sneff
f9d7d56195 Add documentation and make load safe 2019-02-21 14:00:33 -08:00
Lachlan Sneff
c78d4a8674 Fix test compilation 2 2019-02-21 12:55:03 -08:00
Lachlan Sneff
2234f357b7
Merge branch 'master' into feature/cache-rework 2019-02-21 11:54:57 -08:00
Lachlan Sneff
f18da0690e Fix test compilation 2019-02-21 11:54:39 -08:00
Lachlan Sneff
7fa818ea06 Finalize new cache api 2019-02-21 11:47:28 -08:00
Lachlan Sneff
9f40eedba8 Get caching working again 2019-02-20 16:41:41 -08:00
Lachlan Sneff
82eea00a02 Saved 2019-02-19 15:36:22 -08:00
Lachlan Sneff
3c7dc200fa close to working 2019-02-19 09:58:01 -08:00
Lachlan Sneff
e381bbd07b Use ModuleInfo instead of ModuleInner when possible 2019-02-18 11:56:20 -08:00
Brandon Fish
2ed6e82354 Merge branch 'master' into feature/c-api 2019-02-17 17:20:47 -06:00
David McNeil
a9b1c6c85e Fix emscripten environment (#172)
Dynamically determine abortOnCannotGrowMemory and add
_emscripten_get_heap_size and _emscripten_resize_heap
2019-02-16 15:01:01 -07:00
Brandon Fish
9ee86138b9 Impl Error for CallError 2019-02-15 19:16:19 -06:00
Lachlan Sneff
108973dabe Start producing object files with llvm 2019-02-15 16:02:20 -08:00
Christopher Serr
cb29261ec7 Use repr(transparent) for single element structs (#187)
The ABI of aggregates such as single element structs is not required to
be the same as the single elements themselves. This is especially true
for f64 vs. #[repr(c)] struct F(f64); on Windows. Therefore the macro
has been tweaked so S1 uses repr(transparent) which is made for exactly
for this use case.

Closes #183
2019-02-15 15:11:06 -08:00
Mackenzie Clark
2d2d708500
Validate descriptor max on creating new table or memory (#186) 2019-02-15 13:14:42 -08:00
Mackenzie Clark
b68b109b7d
Implement error for remaining errors and the amalgamation error (#184) 2019-02-15 08:15:57 -08:00
Mackenzie Clark
39ef47ebb1
Implement Error for CompilerError (#181) 2019-02-14 21:08:35 -08:00
Mackenzie Clark
09ba27390c
Implement Error for Creation Error (#180) 2019-02-14 19:22:19 -08:00
Mackenzie Clark
6e87676160
Impl error for link error (#182) 2019-02-14 18:40:52 -08:00
Mackenzie Clark
24d028e2a2
impl error trait for ResolveError (#179) 2019-02-14 18:19:18 -08:00
Lachlan Sneff
2d87f64f82 Merge master into feature/llvm-backend 2019-02-14 15:47:28 -08:00
Mackenzie Clark
6a1fdb7f91
add windows exception handling in C (#175) 2019-02-14 09:58:33 -08:00
Syrus
b7c3cc09d1 Fixed typed func implementation 2019-02-12 11:14:20 -08:00
losfair
f735471bac Merge remote-tracking branch 'private/master' into feature/dynasm-backend 2019-02-11 18:38:00 +08:00
Syrus
4311a37def Fixed simple spectests example compilation 2019-02-09 20:13:58 -08:00
Lachlan Sneff
327e3a4a1a Implement many wasm instructions 2019-02-09 15:53:40 -08:00
Syrus
393b7dbdf3 Moved ctx in func macro to be first arg 2019-02-09 13:33:22 -08:00
Lachlan Sneff
aa90a33501 Make module info store FuncSig, not Arc<FuncSig> 2019-02-08 14:19:58 -08:00
Lachlan Sneff
1886b3d3c1
Naive short circuiting implementation for user panics and results. (#167)
* Add panic and result catching

* exit process on panic and user runtime error

* Complete initial implementation
2019-02-08 13:08:03 -08:00
Mackenzie Clark
351b4feeeb implement with_size_protect (#163)
* implement with_size_protect

* no more conditional compilation
2019-02-08 10:32:20 -08:00
losfair
9649219578 Initial work on WebAssembly parser for Dynasm backend. 2019-02-08 23:56:14 +08:00
Lachlan Sneff
8d2c1956d7
Fix runtime error catching (#157) 2019-02-07 14:44:28 -08:00
Lachlan Sneff
dbea7b3abe
Merge branch 'master' into fix/signature-index-wrong-map 2019-02-07 10:46:35 -08:00
Lachlan Sneff
e147983ece fix 2019-02-07 10:45:48 -08:00
Mackenzie Clark
4ab8bd69be
install errno on all platforms (#152) 2019-02-07 10:02:41 -08:00
Mackenzie Clark
bca702794c
assign to the protect enum (#153) 2019-02-07 09:04:57 -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
Mackenzie Clark
7bd609fd58
memory fixes for windows (#138) 2019-02-05 16:07:55 -08:00
Lachlan Sneff
271e68d88b Run fmt 2019-02-05 11:56:36 -08:00
Lachlan Sneff
308d9dde3f Fix compilation 2019-02-05 11:54:30 -08:00
Lachlan Sneff
8a8290b155 Add touch-ups to new memory api 2019-02-05 10:20:04 -08:00
Lachlan Sneff
00db5410c5 Change memory access api again 2019-02-04 23:07:58 -08:00
Lachlan Sneff
563cda7ba2 Merge branch 'fix/emscripten-translate' of github.com:wasmerio/wasmer into fix/emscripten-translate 2019-02-04 15:08:10 -08:00
Lachlan Sneff
7fce447276 Change memory api 2019-02-04 15:07:32 -08:00
Mackenzie Clark
5f753f727c
Merge branch 'master' into fix/emscripten-translate 2019-02-04 15:05:43 -08:00
Mackenzie Clark
e688b374a6
fix some typos (#136) 2019-02-04 10:24:44 -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
79c4566165 Merge branch 'fix/emscripten-translate' of github.com:wasmerio/wasmer into feature/better-type-support 2019-02-01 13:13:12 -08:00
Lachlan Sneff
c0a17f73bf Add wasm extern type trait 2019-02-01 13:10:59 -08:00
Syrus
9370588b86 Merge branch 'master' into fix/emscripten-translate 2019-01-31 14:00:00 -08:00
Brandon Fish
909af1250f Convert em imports to imports! macro 2019-01-30 20:03:54 -06:00
Brandon Fish
cf325f7cd6 Fixup/comment out to get things compiling 2019-01-29 23:08:03 -06:00
Brandon Fish
30caeb0810 Merge branch 'master' into fix/emscripten-translate 2019-01-29 23:07:32 -06:00
Brandon Fish
9f206399de Merge branch 'master' into feature/move-spectests-to-own-lib 2019-01-29 19:04:10 -06:00
Lachlan Sneff
388ac1c8ae
Merge branch 'master' into fix/update-debug-macro 2019-01-29 15:58:51 -08:00
Lachlan Sneff
69e9c5154d Add Pages and Bytes newtypes 2019-01-29 15:44:15 -08:00
Brandon Fish
3d62fc88ca Move spectests to their own library 2019-01-29 16:58:16 -06:00
Lachlan Sneff
bc78738bb7 renaming 2019-01-29 14:15:59 -08:00
Lachlan Sneff
581363119b More review fixes 2019-01-29 13:04:42 -08:00
Lachlan Sneff
767fdbd950 Fix some reviewed items 2019-01-29 12:49:51 -08:00
Lachlan Sneff
d73c7015fb Change memory api a little 2019-01-29 12:12:37 -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
19242a413f Get table imports working 2019-01-29 10:16:39 -08:00
Brandon Fish
948e685dd6 Consolidate to single debug macro, activate using feature 2019-01-28 20:06:57 -06:00
Lachlan Sneff
98305c8731 Add new global import api 2019-01-28 11:55:44 -08:00
Lachlan Sneff
1be20b19e7 Add unused global type 2019-01-28 11:02:53 -08:00
Lachlan Sneff
9b491ec95d Fix memory api to be sound 2019-01-28 10:59:05 -08:00
Brandon Fish
2245c920ed Merge branch 'master' into fix/emscripten-translate 2019-01-27 13:21:44 -06:00
Christopher Serr
d71ee5ad13 Import u64 correctly 2019-01-26 08:47:09 +01: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
e4686e67c4 Add importable memories and dynamic memories 2019-01-25 15:28:54 -08:00
Syrus
29a3af11fc Updated lib crate versions 2019-01-25 10:38:31 -08:00
Syrus
762405f6e9 Merge branch 'master' into fix/emscripten-translate
# Conflicts:
#	Cargo.lock
2019-01-24 14:05:44 -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
Lachlan Sneff
e5c86e00ff
Remove use of debug macro (#117) 2019-01-24 09:46:28 -08:00
Brandon Fish
99bc454c5b Add EmscriptenData to instance and update usages 2019-01-23 23:49:34 -06:00
Brandon Fish
82e7ab6394 Merge branch 'master' into fix/emscripten-translate 2019-01-23 22:57:00 -06:00
Brandon Fish
5ee24d7817 Revert more visibility changes 2019-01-23 22:38:43 -06:00
Brandon Fish
8266386119 Add instance.ctx() to make inner private again 2019-01-23 22:27:33 -06:00
Syrus
2973a32502 Updated cargo 2019-01-23 16:59:37 -08:00
Lachlan Sneff
ab25125bba Change error discriminant name 2019-01-23 16:51:34 -08:00
Lachlan Sneff
c06bd15bff Change Ctx::memory to Ctx::memory_mut and add Ctx::memory 2019-01-23 16:06:42 -08:00
Lachlan Sneff
0aa1687ca3 Add context and context_mut methods to Instance 2019-01-23 15:58:28 -08:00
Lachlan Sneff
147b214965 Fix doc tests 2019-01-23 15:36:13 -08:00
Lachlan Sneff
bc2e527bb2 Add func method to Instance 2019-01-23 15:30:35 -08:00
Steve Akinyemi
8661a0096e Add getting main arguments 2019-01-23 22:29:51 +01: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
c2036c9695 Added memory to emscripten env 2019-01-23 12:25:56 -08:00
Lachlan Sneff
7632beced8
Add generic range bounds to mmap (#110) 2019-01-23 09:37:56 -08:00
Brandon Fish
157183d212 Update to new runtime 2019-01-23 01:27:13 -06: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
Lachlan Sneff
38b0fbf3c5
Generate trampolines to call exported functions instead of using libffi (#108)
* remove codegen.rs

* Add export trampolines and remove libffi

* Remove unused extern crates
2019-01-22 15:00:27 -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